# Autodesk Fusion Add-in

> Install the syn.bike add-in for Autodesk Fusion, link it to a saved bike, and sync geometry and linkage points into a design as user parameters.

The add-in copies a bike you have saved in syn.bike into the active Fusion design as user parameters: one for each geometry value, and an X and a Y for each linkage point. Build your sketches on those parameters and the model follows the bike every time you sync.

The parameters have the same `syn_` names as the SolidWorks add-in's variables, so a model and a habit carry over from one to the other. They are listed on the [CAD Sync](https://syn.bike/docs/cad-sync.md) page.

## Fusion Add-in Requirements

- Autodesk Fusion on Windows or macOS.
- A parametric design, which is one with the timeline turned on. A direct modeling design is refused with a message.
- A bike saved in your **Private** or **Team** database. See [Loading and Saving](https://syn.bike/docs/loading-and-saving-bikes.md).

## Install the Add-in

1. Download the Fusion add-in from the [Downloads](https://syn.bike/downloads) page. It comes as a `.zip` file.
2. Unzip it and find the folder named `synFusion`, the one that contains `synFusion.manifest`. On Windows, **Extract All** puts it inside a new folder named after the zip file, so open that folder first.
3. Put the add-in where Fusion can find it, in either of two ways:
   - Copy that inner `synFusion` folder, not the folder around it, into Fusion's add-ins folder. On Windows that is `%appdata%\Autodesk\Autodesk Fusion 360\API\AddIns`. On macOS it is `~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns`; in the Finder, use **Go > Go to Folder** and paste the path, since the `Library` folder is hidden.
   - Or, in Fusion, open **Utilities > Add-Ins > Scripts and Add-Ins**, click **+**, choose **Script or add-in from device**, and pick that inner `synFusion` folder, the one that contains `synFusion.manifest`.
4. In **Scripts and Add-Ins**, select **synFusion** and click **Run**.

After that, the add-in starts with Fusion every time.

### Find the Commands

In the **Design** workspace, the add-in's commands are in the **syn Linkage** panel on the **Utilities** tab. **Setup Bike Link**, **Sync All Variables** and **Sync Changes** sit on the panel itself; click the panel's name to see the rest. If the **Utilities** tab is not available, the buttons appear in the **ADD-INS** panel instead.

| Command | What it does |
|---|---|
| **Setup Bike Link** | Links the add-in to a bike with a one-time password, then syncs it. |
| **Sync All Variables** | Downloads the saved bike and writes every parameter that differs. |
| **Sync Changes** | Downloads the saved bike and writes the parameters that differ, without a summary. |
| **Switch Size** | Picks which size of a multi-size bike the design shows. |
| **Draw Linkage Points** | Adds a sketch of the linkage points, driven by the parameters. |
| **Link Info** | Shows the linked bike, when the link expires, and the add-in version. |
| **Unlink** | Removes the link from this computer. |

If the panel is not there, open **Utilities > Add-Ins > Scripts and Add-Ins**, select **synFusion** and click **Run**.

### Update the Add-in

The add-in checks for a new version each time Fusion starts. When there is one, a box offers it shortly after start-up, with three choices:

- **Yes** downloads and installs the update, which starts the next time you restart Fusion.
- **No** skips that version, so you are not asked about it again.
- **Cancel** asks again the next time Fusion starts.

If a new version cannot start on your computer, a message says "The syn Linkage update could not be started, so the previous version is running." The add-in keeps running the version it had and does not offer that version again, and **Link Info** shows "Version X could not be started on this computer.", where X is that version's number.

If a syn command is running when the check finishes, no box is shown, and the add-in asks at the next Fusion start. You can also download the latest version yourself from the [Downloads](https://syn.bike/downloads) page.

## Link a Bike

A link connects the add-in to one saved bike.

1. In syn.bike, load the bike and save it. Edits you have not saved are not synced.
2. Open the **Layout** tab, expand **Access Controls and Export**, and click **Setup CAD Sync**.
3. Click **Generate OTP**, then click the copy icon beside the password. It works once and expires after 3 minutes.
4. In Fusion, open the design you want the parameters in and click **Setup Bike Link**.
5. Paste the password into **One Time Password** and click **OK**.
6. A box names the bike ("Successfully linked:") and the first sync starts in the active design. If no parametric design is open, the add-in links the bike and syncs nothing.

The link lasts 5 days. Fusion remembers it between sessions until it expires or you run **Unlink**. After either, generate a new password and run **Setup Bike Link** again. Your parameters and sketches stay in the design.

The bike's name, its year, brand, model and version, is kept with the link, so **Link Info** and **Unlink** name the bike after Fusion restarts.

Every sync writes into whichever design is active, so check which document is in front before you sync. Each design remembers which bike it was last synced from. When that is not the linked bike, **Sync All Variables**, **Sync Changes**, the sync after linking and **Draw Linkage Points** download the bike and then ask:

> This design was last synced from Bike A, and the linked bike is Bike B. Overwrite its syn variables?

**OK** goes ahead, and **Cancel** changes nothing.

The add-in tells bikes apart by the bike itself, not by its name. Renaming the bike in syn.bike asks nothing, and two different bikes with the same name are asked about.

Before it asks, the add-in checks that it can write the bike at all. A design synced by a newer version of the add-in and, for **Sync Changes**, a design that is missing some of the parameters each stop the sync with a message instead. So once you click **OK**, the sync goes ahead.

Saving the bike under a new **Version** creates a separate bike, which needs its own link.

**Unlink** asks before it removes the link from this computer. The link stays in the web app's list until you remove it there. If the web app shows a warning instead of a password, see [Set Up a Link From the Web App](https://syn.bike/docs/cad-sync.md#set-up-a-link-from-the-web-app). To see or remove links from the web app, see [Manage CAD Links](https://syn.bike/docs/cad-sync.md#manage-cad-links).

## Sync the Variables

**Sync All Variables** downloads the saved bike and writes it into the active design as user parameters, which you can see under **Modify > Change Parameters**. There are 32 linkage point parameters (`syn_p0_x` to `syn_p15_y`) and 21 geometry parameters such as `syn_reach` and `syn_hta`. Each one has the comment "Synced from syn", which marks the parameters the add-in created.

Only values that differ are written. A box then lists what changed as `variable: old > new`, or reads "All bike variables successfully set" when every parameter it wrote was new, or "Everything is already up to date, so nothing was written." A value you typed over by hand is set back to the bike's value.

The first time you run **Sync All Variables** in a design that has no linkage point parameters, the add-in asks before downloading anything:

> "Frame" does not have the bike's syn variables yet. Sync them into this design now?

**Cancel** leaves the design untouched.

Each sync is a single undo step, so one **Undo** takes back the whole sync. If Fusion refuses any value, the whole sync is undone and nothing is changed.

### Units and Coordinates

Every value is written with its unit, for example `412.5 mm` or `64.5 deg`, so it is right whatever units the design uses.

Linkage point values are the real coordinates relative to the bottom bracket, X positive toward the front of the bike and Y positive up, so most of them have a negative X. They are not shifted by the offsets that the Onshape sync applies.

### Sizes

How a bike is written depends on how many sizes it has.

- **One size:** each geometry parameter holds its value, for example `syn_reach` = `475 mm`.
- **More than one size:** each size gets its own parameter, ending `_s` and the size number: `syn_reach_s1`, `syn_reach_s2`, `syn_reach_s3`. Sizes count from 1 in the order of the size columns in the **Geometry** tab. `syn_reach` itself holds the name of one of them, such as `syn_reach_s2`, so it always shows the active size.

Linkage point parameters are the same in every size. Build your model on `syn_reach` and the other unsuffixed names, and it follows the size you choose with [Switch Size](#switch-size). A new design starts on the first size. After that, **Sync All Variables** and **Sync Changes** both keep the size the model is showing, which they read from `syn_reach` itself. They keep it by its number, so renaming sizes in syn.bike does not move the model, and after a reorder it stays on the same number. If the bike no longer has that many sizes, the model goes back to the first size. Fusion configurations are not used.

A multi-size bike can gain, lose, rename or reorder sizes and still sync into the same design. When it gains a size, run **Sync All Variables**, which adds the new size's parameters. Until then, **Sync Changes** stops with "Variables are missing. Please sync all data before attempting an update." A bike that loses, renames or reorders sizes syncs with either command. Parameters for a size the bike no longer has are left in the design, and you can delete them in **Modify > Change Parameters**.

A bike can also go from one size to several, or back to one, and still sync into the same design:

- **One size to several:** **Sync All Variables** adds the parameters for each size and points `syn_reach` and the other unsuffixed names at the first size, so the model shows the first size. Until then, **Sync Changes** stops with "Variables are missing. Please sync all data before attempting an update."
- **Several sizes to one:** **Sync All Variables** or **Sync Changes** writes the remaining size's values into `syn_reach` and the other unsuffixed names. The old per-size parameters are left in the design, and you can delete them in **Modify > Change Parameters**.

### Switch Size

**Switch Size** picks which size a multi-size design shows. Choose the size under **Size** and click **OK**. It downloads nothing: the 21 geometry parameters are pointed at that size's values, which are already in the design. Each switch is one undo step. **Switch Size** opens on the size the model is showing, including after an **Undo**.

### Sync Changes

**Sync Changes** is for the edit-save-sync loop. It downloads the saved bike, compares it with the design's own `syn_` parameters, and writes only the values that differ. It shows nothing when it succeeds or when nothing has changed.

Like **Sync All Variables**, it sets any `syn_` value you typed over by hand back to the bike's value, even when that value did not change in syn.bike.

It needs a design that already has all the `syn_` parameters, so run **Sync All Variables** once first, and again when the bike gains a size. Otherwise it stops with "Variables are missing. Please sync all data before attempting an update."

## Draw Linkage Points

**Draw Linkage Points** adds a sketch named `syn Linkage Points` of the linkage points, each one dimensioned from the synced parameters. When you sync, the sketch moves with the bike.

The sketch uses the values last synced into the design, so sync first if the bike has changed. The command stops before it downloads anything while a sketch is open. After the download, and before it offers any sync, it checks the offsets (see [The Offset Datum](#the-offset-datum)) and stops for a design synced by a newer version of the add-in. If the design does not have the linkage point parameters yet, the command offers to sync them first. If the design was last synced from a different bike, it asks the question in [Link a Bike](#link-a-bike); **OK** syncs the linked bike first and then goes on to the plane dialog, and **Cancel** draws nothing.

1. Open the design and finish any sketch you are editing.
2. Click **Draw Linkage Points**.
3. Under **Plane**, pick a construction plane or a flat face for the sketch. The YZ plane, which faces Fusion's **Right** view, is selected already.
4. Click **OK**.

A box reports what was drawn, for example "Added 8 linkage points. Added 9 link lines and 2 frame circles."

Every run draws into a new sketch, so running it twice gives you two sets of points. A drawing is a single undo step, and a drawing that fails part-way leaves nothing behind.

### What the Sketch Contains

- The points, at their real coordinates relative to the sketch origin, with the bottom bracket fixed at the origin. A point at (0, 0) that the linkage does not use is skipped.
- A horizontal and a vertical dimension for each point, named `syn_p3_x_dim` and `syn_p3_y_dim` for point 3 and driven by `syn_p3_x + syn_x_offset` and `syn_p3_y + syn_y_offset`.
- Lines joining the points of each link, following the bike's **Linkage Setup** in syn.bike.
- A 20 mm circle at each point where a link pivots on the frame. Its diameter dimension, such as `syn_p4_frame_dia`, is not tied to the bike, so you can change it.

The lines and circles are construction geometry, so they guide your design without becoming part of a feature's profile.

Fusion needs every dimension name to be unique in a design. So while the first sketch is still there, a second one's names end in `_2` (`syn_p3_x_dim_2`), a third one's in `_3`, and so on.

### The Offset Datum

Every point except the bottom bracket is dimensioned from the offset datum, a reference point at `-syn_x_offset`, `-syn_y_offset` from the sketch origin, placed by the dimensions `syn_datum_x` and `syn_datum_y`. It gives the sketch the same dimensions as one drawn by the SolidWorks add-in.

The command creates `syn_x_offset` (500 mm) and `syn_y_offset` (100 mm) if the design does not have them, and a sync never overwrites them. They rarely need changing. If you do change one, use **Modify > Change Parameters** and keep it a plain number of millimeters, such as `500 mm`. Unlike in SolidWorks, a point further behind or below the origin than the offsets is still drawn correctly.

## Fusion Logs and Error Reports

If we ask for a log when a sync is slow or fails, it is `fusion-sync.log`, in `%LOCALAPPDATA%\syn\fusion` on Windows and in `~/Library/Application Support/syn/fusion` on macOS. The add-in also sends error reports to syn.bike automatically. Neither contains coordinates or bike names.

## Differences From the SolidWorks Add-in

| Aspect | SolidWorks | Fusion |
|---|---|---|
| Where the values go | Global variables, under **Tools > Equations** | User parameters, under **Modify > Change Parameters** |
| Units | Plain numbers, so the part must be in millimeters | Each value carries its unit (mm or deg) |
| How long a link lasts | Until SolidWorks closes, and at most 5 days | Between Fusion sessions, until it expires after 5 days or you run **Unlink** |
| Sizes | One configuration per size, or the first size only | One parameter per size (`syn_reach_s1`, `syn_reach_s2`, ...), with `syn_reach` following the size chosen in **Switch Size** |
| **Sync Changes** | Writes only what changed in syn.bike since the last sync | Compares the saved bike with the design's own parameters, so it also sets values typed over by hand back to the bike's |
| Default sketch plane | Right Plane | YZ plane, Fusion's **Right** view |
| Offsets | Must be large enough that every point sits beyond the datum | Any plain number of millimeters |
| A second drawing | Same dimension names in each sketch | Dimension names end in `_2`, `_3`, ... |

In Fusion, each sync, each size switch and each drawing is a single undo step.

## Fusion Add-in Troubleshooting

### Fusion Link Messages

| Message | Cause | What to do |
|---|---|---|
| "That one-time password was not recognised. Generate a new one in syn Linkage and try again." | The password was mistyped or has already been used. | Generate a new password in syn.bike and paste it in straight away. |
| "That one-time password has expired. Generate a new one in syn Linkage and try again." | The password is older than 3 minutes. | Generate a new password in syn.bike and paste it in straight away. |
| "Could not reach syn. Check your internet connection and try again." | The add-in got no answer from syn.bike, when linking or syncing. | Check your internet connection and try again. |
| "Could not link the bike. Please try again." | syn.bike could not complete the link. | Try again with a new password. |
| "Bike is not yet linked. Please setup bike link first." | There is no link on this computer: the bike was never linked or you ran **Unlink**. An expired link shows "Bike link has expired. Please setup bike link again." instead. | Run **Setup Bike Link**. |
| "Bike is not yet linked." | You ran **Unlink** when there was no link on this computer. | Nothing to do: there is no link to remove. |
| "Bike link has expired. Please setup bike link again." | The link is older than 5 days. | Generate a new password and run **Setup Bike Link**. |
| "This bike link was removed in syn Linkage. Please setup bike link again." | The link was removed under [Manage CAD Links](https://syn.bike/docs/cad-sync.md#manage-cad-links) in the web app. | Generate a new password and run **Setup Bike Link**. |
| "This link lasts until Fusion closes." | The add-in could not keep the link for later sessions. The link works for this session. | Run **Setup Bike Link** again after Fusion restarts. |
| "The bike was unlinked for this session, but the link may come back when Fusion restarts. Run Unlink again after restarting." | **Unlink** could not remove the link from this computer. | Run **Unlink** again after restarting Fusion. |
| "Another syn Linkage command is still running. Please wait for it to finish." | Another syn command is still downloading or writing. | Wait for it to finish, then run the command again. |

### Fusion Sync Messages

| Message | Cause | What to do |
|---|---|---|
| "Open a design and run the command again." | No design is active. | Open the design and make it the active document. |
| "syn Linkage works in a parametric design. Open one, or turn on the timeline for this design, and run the command again." | The design is a direct modeling design. | Open a design with a timeline, or turn on design history for this one. |
| "Unable to retrieve data" | The download failed. | Try again. If it keeps failing, generate a new password and run **Setup Bike Link**. |
| "Variables are missing. Please sync all data before attempting an update." | **Sync Changes** ran in a design that does not have all the parameters, has never had a **Sync All Variables**, or the bike gained a size, including a single-size bike that now has several. See [Sizes](#sizes). | Run **Sync All Variables** once. |
| "The active document changed while the bike data was downloading, so nothing was written. ..." | You switched documents during the download. The message names the document the command started in. | Switch back to that document and run the command again. |
| "This design was last synced from Bike A, and the linked bike is Bike B. Overwrite its syn variables?" | A question, not an error: the design was last synced from a different bike than the linked one. A bike renamed in syn.bike is still the same bike, and two bikes with the same name are still different bikes. | **OK** writes the linked bike into the design. **Cancel** changes nothing. See [Link a Bike](#link-a-bike). |
| "This design was synced by a newer version of the syn add-in. Update the add-in, then try again." | The design was last synced by a newer version of the add-in than the one you have, for example on another computer. | [Update the add-in](#update-the-add-in), then run the command again. |
| A message starting "3 values could not be written: syn_reach, ..." and ending "Nothing was changed." | Fusion did not accept some of the values, so the whole sync or size switch was undone. | Sync again. If it repeats, [send us](https://syn.bike/contact) `fusion-sync.log`. |
| "Switch Size is for designs synced from a bike with more than one size." | The design was synced from a single-size bike, or has not been synced yet. | Nothing to do if the design has only one size. If it has not been synced yet, run **Sync All Variables** first. |

### Fusion Drawing Messages

| Message | Cause | What to do |
|---|---|---|
| "Finish the sketch, then run Draw Linkage Points to pick a plane." | A sketch is open for editing. | Click **Finish Sketch**, then run the command again. |
| "This design does not have the bike's syn variables yet. Sync them now to draw the linkage points?" | A question, not an error: the design is missing the linkage point parameters. | **OK** syncs them and then opens the plane dialog. **Cancel** draws nothing. |
| "Select a construction plane or planar face, then run Draw Linkage Points again." | No plane was selected when you clicked **OK**. | Run the command again and pick a plane or a flat face. |
| "syn_x_offset and syn_y_offset must each be a plain number of millimetres, such as 500 mm, ..." | An offset holds an expression or another unit. | In **Modify > Change Parameters**, set it to a number of millimeters, for example `500 mm`. |
| A message starting "Fusion could not" and ending "Nothing was drawn." | Fusion refused one step of the drawing, so the whole sketch was undone. | Run the command again. If it repeats, [send us](https://syn.bike/contact) `fusion-sync.log`. |
| "The dimension for syn_p3_x_dim has no parameter. Nothing was drawn." | Fusion added a dimension without the parameter that names it, so the whole sketch was undone. | Run the command again. If it repeats, [send us](https://syn.bike/contact) `fusion-sync.log`. |
| "The name syn_p3_x_dim is already used in this design, so the dimension could not take it. Nothing was drawn." | Something else in the design already has a name the drawing needs, so the whole sketch was undone. | Rename whatever uses that name, then run the command again. If it repeats, [send us](https://syn.bike/contact) `fusion-sync.log`. |

Any other failure appears as "Something went wrong running that command:" followed by the detail from Fusion. Run the command again, and if it repeats, [send us](https://syn.bike/contact) `fusion-sync.log`.

### Fusion Update and Start-up Messages

| Message | Cause | What to do |
|---|---|---|
| "Could not download the update. You can get it from ..." | The update could not be downloaded, or the download did not pass the add-in's checks. Nothing was installed, and the version you have keeps running. | Restart Fusion to be offered the update again, or download it from the address in the message and [install it](#install-the-add-in) yourself. |
| "The update is ready. Restart Fusion to finish installing it." | Not an error: the update is installed and starts the next time Fusion starts. | Restart Fusion. |
| "syn Linkage could not start: ..." | The add-in failed to load, and the message ends with the reason. The syn commands are not available. | Restart Fusion. If it repeats, download the add-in from the [Downloads](https://syn.bike/downloads) page and [install it](#install-the-add-in) again, and [send us](https://syn.bike/contact) the message. |
