ConfigurationRulesManager Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/ConfigurationRules/ConfigurationRulesManager.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 programmatic access to the configuration rules for a design. Obtained via Design.configurationRulesManager; returns null for designs that are not configured designs. All operations require the owning design to be the active design.

Configuration rules are stored remotely (on the rules pipeline backing this design), so every read is a discrete round-trip rather than an in-memory lookup. Callers read via getRules, itemById, or itemByIds rather than indexing this manager directly.

Constructing rules, blocks, values, and modify inputs happens through the static create factories on each concrete class (ConfigurationRule.create, ConfigurationRuleSetBlock.create, ConfigurationRuleStringValue.create, ConfigurationRulesModifyInput.create). This manager exposes only the design-scoped read/write operations.

Methods

Name Description
addRule

Creates a single new rule with the given name, an empty body, and isActive = true. This is a shortcut equivalent to building a ConfigurationRulesModifyInput with one added rule and calling modifyRules; use it when you only need to add one rule and do not need to batch other changes. Use ConfigurationRule.create + modifyRules when you need to populate the body before submitting. The new rule's comment is seeded with a default placeholder rather than left empty.

classType

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

deleteRule

Deletes the rule with the specified id. This is a shortcut equivalent to building a ConfigurationRulesModifyInput with one entry in deleteRuleIds and calling modifyRules; use it when you only need to delete one rule and do not need to batch other changes.

getRules

Returns every rule on this design in a single round-trip, along with any non-fatal issues from the read. This is the canonical "read everything" entry point; use itemById or itemByIds when only a specific subset is needed.

itemById

Returns the rule with the specified id, along with any non-fatal issues from the read. Throws if the id is empty or does not match an existing rule; use itemByIds to get a RULE_NOT_FOUND issue instead of an exception for an unmatched id.

itemByIds

Returns the rules matching the specified ids, along with any non-fatal issues from the read.

modifyRules

Applies the request described by input atomically. Deletes run first, then reorder, then adds and updates. Non-fatal per-rule problems are reported in the result's issues array; the rest of the batch still applies even when a VALIDATION_FAILED or RULE_NOT_FOUND issue is recorded. Fatal errors (invalid request shape, uninitialised rules pipeline, missing extension entitlement) throw an exception.

Always inspect the returned issues array after a successful call — an empty array means a clean apply; a non-empty array means at least one block silently degraded to a placeholder.

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.configurationRulesManager, FlatPatternProduct.configurationRulesManager, WorkingModel.configurationRulesManager

Samples

Name Description
Configuration Rules API Sample

Demonstrates reading and modifying configuration rules using the typed ConfigurationRules API.

Before running: Run in the DESIGN workspace from Scripts and Add-Ins (Python, C++, or TypeScript), unless the script states otherwise.

Version

Introduced in version October 2026