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