Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fusion Update Parameters from CSV

A small Fusion 360 Python script that updates existing user parameters and creates missing user parameters from a CSV file.

Unlike importing parameters as new entries (which is the standard import behavior - at least with the Personal Edition), this script first looks up each parameter by name. Existing parameters are updated directly, preserving references in sketches, features, and other parameter-driven geometry. Parameters that do not exist yet are created as new user parameters.

Features

  • Updates existing Fusion 360 user parameters by name
  • Preserves parameter references in sketches and features
  • Creates new parameters not already in the design
  • Avoids duplicate parameters with _1 suffixes
  • Supports Fusion-style CSV exports
  • Updates parameter comments when available
  • Updates the Favorite state when supported
  • Handles UTF-8, UTF-8 with BOM, and Windows-1252 CSV files
  • Converts decimal commas to decimal points for simple numeric values
  • Adds the CSV unit to plain numeric expressions when required
  • Displays a summary after processing

CSV format

The expected CSV headers are:

Name,Unit,Expression,Value,Comments,Favorite

Example:

Name,Unit,Expression,Value,Comments,Favorite
Width,mm,120,120 mm,Overall width,true
Height,mm,Width / 2,60 mm,Calculated height,false
WallThickness,mm,2.4,2.4 mm,Main wall thickness,true

The script primarily uses the following columns:

Column Purpose
Name Name of the Fusion user parameter to update or create
Unit Unit appended when the expression contains only a number
Expression New parameter expression
Comments Optional parameter comment
Favorite Optional Favorite state

The Value column may be present in Fusion exports but is not used.

Important behavior

Existing parameters are updated in place so geometry references remain connected. If a CSV parameter does not exist in the active design, the script creates it as a new user parameter using its name, expression, unit, comment, and Favorite state where supported.

Because the script checks for an exact name match before creating a parameter, an existing parameter is not re-imported with a suffix such as Width_1.

Empty expressions are also skipped to prevent existing parameter expressions from being cleared accidentally.

Off-the scale parameters might lead to errors and/or a loss of geometry features (and making a model "parameter-safe" is sometimes quite tricky). Sometimes this is not critical (e.g. some minor fillet or chamfer errors). If your geometry gets unusable/distorted just reverting to a working set of parameters might not return your intended geometry. Better then to restart from a working set of parameters.

Installation

  1. Download or clone this repository.

  2. Open Fusion 360.

  3. Go to:

    Utilities → Add-Ins → Scripts and Add-Ins

  4. Open the Scripts tab.

  5. Click the green + button next to My Scripts.

  6. Select the folder containing the script.

  7. Select the script and click Run.

Depending on your Fusion version, menu names may differ slightly.

Usage

  1. Open the Fusion design containing the user parameters you want to update.

  2. Run the script.

  3. Select the CSV file when prompted.

  4. The script matches each CSV row to a user parameter using the Name column.

  5. Matching parameters are updated in place; missing parameters are created.

  6. A summary dialog reports:

    • Existing parameters updated
    • New parameters added
    • Rows skipped because the name or expression was empty
    • Errors

Expression handling

For plain numeric expressions, the script performs some normalization.

For example:

Name,Unit,Expression
Width,mm,25

is applied as:

25 mm

A decimal comma is converted to a decimal point:

25,5

becomes:

25.5

Expressions containing formulas or parameter references are passed to Fusion unchanged:

Width / 2

Limitations

  • The script updates user parameters only.
  • Parameter names must match exactly.
  • Invalid Fusion expressions are counted as errors.
  • Updating the Favorite state depends on support in the installed Fusion API version.
  • The script must be run with an active Fusion design open.
  • Changes are applied directly to the current design.

Create a backup or save a new version of important designs before applying a large parameter file.

Compatibility

Designed for the Fusion 360 Python API and intended to work with the Personal Use edition as well as commercial Fusion installations.

License

This project is available under the MIT License.

Contributing

Bug reports, improvements, and pull requests are welcome.

When reporting an issue, include:

  • Fusion version
  • Operating system
  • A minimal example CSV
  • The displayed error or processing summary

About

Fusion 360 add-in/Python script that updates existing user parameters from a CSV file without creating duplicate parameters.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages