
This functionality is provided as a preview
of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the
Fusion API and Scripts forum.
Because this is a preview of future functionality, there is the possibility that it will change, which will possibly
break any existing programs that use this functionality. Because of that, you should never deliver any programs that use
any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.
Base class for the various types of assembly constraint definitions. When accessed through the definition property of an existing AssemblyConstraint object, the definition can be used to incrementally query and edit that constraint. When accessed through an AssemblyConstraintSetInput object, the definition is temporary and is used to define a constraint that will be created when the assembly constraint set is created.
When editing an existing constraint, changes made to a definition while the timeline is rolled back are not computed until the timeline is rolled forward past the parent assembly constraint set.
| Name | Description |
| classType |
Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType(). |
| setBiasPoints |
Optionally defines bias points that influence the initial positioning of the occurrences when a constraint is created. These points are equivalent to the pick points when selecting the geometry for a constraint. The two pick points are aligned when the constraint is created. Otherwise, arbitrary pick points are used. The bias points are only used for the initial placement and do not affect the constraint after it has been created. |
| Name | Description |
| constraintType | Returns the type of this assembly constraint definition. |
| isTemporary | Specifies if this definition is associated with an AssemblyConstraintSetInput object and is being used to define a new assembly constraint set. It is true when the definition is part of an input object and the assembly constraint has not yet been created. It is false when the definition is associated with an existing AssemblyConstraint object. |
| 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 constraint as displayed in the Edit Constraints dialog and in the browser. If the isTemporary property is false, you need to position the timeline marker immediately before the parent assembly constraint set before setting this property. This can be accomplished using the following code: parentSet.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(): |