AlignAssemblyConstraintDefinition Object Preview

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

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

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never 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 information that defines an align constraint in an assembly constraint 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().

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.

Properties

Name Description
constraintLimits Returns the constraint limits associated with this align constraint definition.
constraintType Returns the type of this assembly constraint definition.
entityOne Gets and sets the first entity in the constraint. The entity can be a planar, cylindrical, elliptical or toroidal BRepFace, linear, circular, or elliptical BRepEdge, BRepVertex, SketchLine, SketchArc, SketchEllipse, SketchPoint, ConstructionPlane, ConstructionAxis, or ConstructionPoint object.

If the constraint is associated with an existing assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the parent assembly constraint set. This can be accomplished using the following code: parentSet.timelineObject.rollTo(True).
entityTwo Gets and sets the second entity in the constraint. The entity can be a planar, cylindrical, elliptical or toroidal BRepFace, linear, circular, or elliptical BRepEdge, BRepVertex, SketchLine, SketchArc, SketchEllipse, SketchPoint, ConstructionPlane, ConstructionAxis, or ConstructionPoint object.

If the constraint is associated with an existing assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the parent assembly constraint set. This can be accomplished using the following code: parentSet.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 constraint is associated with an existing assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the parent assembly constraint set. This can be accomplished using the following code: parentSet.timelineObject.rollTo(True).
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():
offset This property is used when the definition is associated with an existing assembly constraint (the isTemporary property is false). It returns the parameter that controls the offset of this constraint. You can change the value by editing properties on the returned ModelParameter object.

If the isTemporary property is true, this property returns null, and you should use the offsetValue property to get and set the value.
offsetValue This property is used when creating or editing an assembly constraint set and defines the offset of the constraint. It can be set with a ValueInput object defining a length.

If the isTemporary property is false, this property will return null and the offset property should be used to access the parameter that controls the offset of the constraint.

Accessed From

AssemblyConstraintDefinitions.addAlign, AssemblyConstraints.createAlignDefinition

Version

Introduced in version November 2026