Skip to main content
Anton_Bahrencheer
New Member
Jun 21, 2023 8:57 PM UTC

LAUNCHED: Moving or copying variables

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
Jun 22, 2023 11:12 AM UTC

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

Anton_Bahrencheer
New Member
Jun 22, 2023 11:26 AM UTC

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
Jun 23, 2023 1:29 AM UTC

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
Jun 23, 2023 9:15 AM UTC

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

Yejin_Park_Private
Jun 27, 2023 3:23 PM UTC

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
Jun 30, 2023 9:42 PM UTC

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
Jul 4, 2023 10:41 AM UTC

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
Jul 6, 2023 4:40 PM UTC

thanks dude.

Aug 16, 2023 7:23 AM UTC

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
Aug 17, 2023 7:22 PM UTC

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 😦