Skip to main content
Question

Relinking my variables collection to a copy of my primitives collection

  • April 30, 2026
  • 3 replies
  • 50 views

Thomas_Cramer

Hi

I have a pretty large design file. In that file I have a substantial amount of variables. They all link (aliased) to variables in another file where my primitives are placed.

What I would like to achieve is to be able to copy my Design file and copy my Primitives file. I Then need the variable collection in my COPY-Design file to be relinked to my new primitive file called COPY-Primitives.

I know how to use plugins for importing collections and relinking variables on components that way. But I cannot seem to find a way or a plugin where I can relink my entire variable collection to a copy of my primitives. At least not automatically. 

Any way I can accomplish relinking my variable collection to my new copy of my primitives without going through plus severeal hundred variables manually?

Thanks.

3 replies

Jaycee Lewis
Figmate

Hey, ​@Thomas_Cramer 👋 Thanks for reaching out! This is a great question, and we definitely want to save you from that manual work.

The first thing we should look at is Swap Library. It's designed for exactly this — it relinks an entire variable collection by matching names. 50 or 500, it's the same operation. And it can be a bit picky about how files are set up. 

To make sure it works for your specific flow, I have a few quick questions:

  • Are your libraries published? For Swap Library to see them, both your original Primitives and the new COPY-Primitives file need to be published to your team or organization
  • Where do the variables live? In your Design file, are those variables local and just aliased to the library, or are you using them directly from the library? This helps us determine if swapping is the right path
  • Are the names identical? Variables by their name and group path like brand/color/primary Do the names match exactly between the two files?

Thanks for the additional details. And if you’ve already ruled out this approach, that’s great info to know too 😊
– Jaycee


Thomas_Cramer
  • Author
  • New Participant
  • May 4, 2026

Hi again ​@Jaycee Lewis 

Thanks for getting back to me. I just had a look at the Swap Library feature. Unfortunately, by the look of it, it doesn’t support variables. Only components and styles:
 



So to sum it up again what I would like to be able to do is the following:

I have a main file. Lets call it main.file

I have a secondary file with all my variables. Lets call it variables.file

 

The variables in the main file - main.file - are aliased/linked to the variables in my other file called variables.file.

 

I then want to make a copy of both files (which leaves me with 4 files). So I know have main-copy.file and variables-copy.file. All naming, variables and components are the same in both files. Only the name differs.

 

The variables in the main-copy.file still link to the “old” variable library in variables.file


I want those variables in main-copy.file to be relinked to the copy of the variable file called variables-copy.file

I can then edit my variables in the variables-copy.file and it will only affect the main-copy.file.

However, with plus several hundreds of variables, it would be great if it could be done automatically so that I do not need to spend time relinking everything again.

Many thanks


Arthur
  • New Participant
  • May 29, 2026

Hi Thomas, you can look for plugins that do this. I know that the DSO plugin re-links everything in batch mode, the entire document. Specifically, it has a function to search and re-link among variables (aliases to other variables).

You need to open the plugin in the file where you have your new variable masters and mark them. Then, in the file where you need to update, select "apply to all styles" and click swap. Works fast for variable aliases (slow for layers), free to try with limits.