I’m trying to use importVariableByKeyAsync method: importVariableByKeyAsync | Plugin API.
It’s described as method for getting variable from published library. But I’m getting only local variable
I’m trying to use importVariableByKeyAsync method: importVariableByKeyAsync | Plugin API.
It’s described as method for getting variable from published library. But I’m getting only local variable
Could you please add a detailed description? This method imports a remote variable from a library.
My goal is to compare local and published variables. Is there any other way to do this if method importVariableByKeyAsync doesn’t match my needs?
I published my variable to library. Then I changed the same variable locally. When I’m calling importVariableByKeyAsync, I expect to get variable stored in published library, but I get local variable
It looks like you are running the plugin and using this method in the same file where this variable is published. Instead, you should have run the plugin in a different file (not the library file where this variable is published). That is, get a local variable in a library file, then open another file and import that variable.
Also consider using REST API if your plan allows it:
https://www.figma.com/developers/api#variables
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.