Skip to main content
Anton_Bahrencheer
New Member
June 21, 2023

LAUNCHED: Moving or copying variables

  • June 21, 2023
  • 73 replies
  • 53056 views

Has anyone found a way to copy, transfer or move the new local variables to another file or collection?

Just created around 400 color variables manually in the wrong file and would hate having to re-create them in the correct one 😅

73 replies

Equinusocio
June 22, 2023

It seems SHIFT + Enter does the trick after selecting a variable.

Anton_Bahrencheer
New Member
June 22, 2023

Awesome shortcut for duplication, will save some time for sure! 😃

You haven’t found a way to transfer the variables to another file though right?

Richard_Simms
June 23, 2023

I had the same question and found this:

Copy pasting variables across files

Variables can be used in prototypes.

Currently, if you copy and paste objects to different file, the prototype will continue to work as the variables transfer over. However, any unpublishedvariables applied to prototypes won’t be available for further use, like when creating Set variable actions, or switching an object’s number variable.

We are working on improving transferring variables across files. As a workaround, either recreate the variables in the destination file, or duplicate the original file.

If the original file is published to team libraries, copied and pasted variables will work as expected.

If you receive a notification that pasting unpublished variables across files won’t create new local variables yet, try publishing the source library and and enabling it in the destination file.

Figma Help Center
Anton_Bahrencheer
New Member
June 23, 2023

Ahh bummer, will have to go manual again then, thanks for finding this! 🙂 Hope they add the feature soon 🤞

Yejin_Park_Private
June 27, 2023

Has this feature been added yet? I’ve also made a mistake of generating 100+ variables in a file that I originally intended to delete 😦
I was able to publish this file to use the variables in the correct design system file, but I’d hate to leave the wrong file in my pj folder just because I need to use it as a variables library. Is there really no other way to move these variables to the file I want…?

owen5
New Participant
June 30, 2023

In addition to moving variables from one file to another, I’d also like to have a way to copy aliases and variables within a file. For example, I have 10 variables across 2 modes which all need to have the same alias applied to them. The current workflow requires that I manually assign an alias every time, instead of copying an alias from an existing variable.

Sorin_Jurcut
New Participant
July 4, 2023

I managed to find a workaround by exporting them as json and importing them back via the same JSON

For export I use this plugin: https://www.figma.com/community/plugin/1254848311152928301

For import I use this one:

Figma

As a caveat for the second plugin, be aware you’ll need to perform some cleanup work post-export. Not a huge deal, but a bit annoying.

If you are going to use the import from the first plugin, it will give you a range exception and you’ll have to reload the file. Just be aware of that !

Erich_Quist
July 6, 2023

thanks dude.

August 16, 2023

I can’t make it work with Variables Export/import, even though I copy the code into a JSON-file. I get error messages when trying to import the file with Vaiables import and also when pasting the code in the window in the Variables Imoprt/Export plugin.

Elham_Mahootchi
August 17, 2023

Doesn’t work for me either. When I click try to Export the Variable Collection, nothing happens. I can see them as codes and I can see the blue Export Variable CTA but nothing happens when I click on it 😦