
This functionality is provided as a preview
of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the
Fusion API and Scripts forum.
Because this is a preview of future functionality, there is the possibility that it will change, which will possibly
break any existing programs that use this functionality. Because of that, you should never deliver any programs that use
any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.
Represents an assembly constraint set which is the item you see in the timeline and browser when creating assembly constraints. The set groups constraints and provides the ability to query and edit the constraints in the set.
To edit an existing assembly constraint set, position the timeline marker immediately before the set and make one or more changes to the set or to the constraints it contains. Although the API supports making individual changes, the assembly is not recomputed until the timeline is rolled forward past the set. In practice, multiple edits made while the timeline is rolled back behave like a single batch update when the timeline is rolled forward.
| Name | Description |
| classType |
Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. This creates a new object that represents this object but adds the assembly context defined by the input occurrence. |
| deleteMe |
Deletes this assembly constraint set. |
| Name | Description |
| assemblyConstraints | Returns the AssemblyConstraints collection which provides access to the assembly constraints owned by this set and provides the ability to add and remove constraints from the set. |
| 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 set. |
| entityToken | Returns a token for the assembly constraint set object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same assembly constraint set. When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what 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. |
| healthState | Returns the current health state of the assembly constraint set. |
| isLightBulbOn | Gets and sets if the light bulb of this assembly constraint set, as displayed in the browser, is on or off. An assembly constraint set will only be visible if the light bulb is switched on. However, the light bulb can be on and the assembly constraint set 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 Constraints or Relationships folder is off. |
| isSuppressed | Gets and sets if this assembly constraint set is suppressed. If suppressed, all of the assembly constraints within the set 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 set 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 set. This is the name seen in the browser and timeline. To set this property on an existing assembly constraint set, you need to position the timeline marker immediately before this assembly constraint set. This can be accomplished using the following code: thisConstraintSet.timelineObject.rollTo(True). |
| 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 assembly constraint set. |
| primaryOccurrence | Returns the primary occurrence constrained by this assembly constraint set. All constraints in the set use geometry from this occurrence for their first-side inputs. |
| secondaryOccurrences | Returns the secondary occurrences constrained by this assembly constraint set. Each constraint in the set uses geometry from one of these occurrences for its second-side inputs. A set with constraints between two components returns a single secondary occurrence; sets with constraints to additional components return one entry per distinct secondary occurrence. |
| timelineObject | Returns the timeline object associated with this assembly constraint set. |