Skip to main content

Sketch: Troubleshoot Sketch

Vinh
Vinh
  • Updated

My file has been duplicated in zeroheight

This means the ID of the Sketch file has changed. To find your old ID, email support@zeroheight.com. Once they've given you the old ID, follow these steps:

1) In your Sketch file, go to Plugins Run Script

2) Paste the following into the top window

var document = require('sketch/dom').getSelectedDocument();
document.sketchObject.documentData().setObjectID('XXXXXXXXX');
document.save();

3) Replace the XXXXXXXXX with the original ID we gave you

4) Click Run - Note: this will save your file, so make sure you're OK with that

5) Click Close

6) Uploading to zeroheight should now update your older file

 

I used Save As.. or Abstract. How can I prevent creating a new zeroheight upload?

1) In your original Sketch file, go to Plugins Run Script

2) Paste the following into the top window

var document = require('sketch/dom').getSelectedDocument();
console.log(document.sketchObject.documentData().objectID());
 

3) Click Run

4) The bottom window should now display something like:

'82727A99-8702-4A3A-B736-EA7EFC3E2F72'
Script executed in 0.168973s

5) Take note of that long string on the first line

6) In your new Sketch file, go to Plugins Run Script

7) Paste the following into the top window

var document = require('sketch/dom').getSelectedDocument();
document.sketchObject.documentData().setObjectID('XXXXXXXXX');
var oldName = context.document.pages()[0].name();
context.document.pages()[0].name = 'foo';
document.save();
context.document.pages()[0].name = oldName;
document.save();

8) Replace the XXXXXXXXX with the long string from your original Sketch document.

9) Click Run - Note: this will save your file, so make sure you're OK with that

10) Click Close

11) Upload to zeroheight using the plugin. You will see a warning similar to the following:

Warning window for renaming Sketch files

12) Choose Rename - this will rename your original file in zeroheight to the name of the new Sketch file

13) Everything should be good 👍 Get in touch with us if it's not working!

 

Share this article
Was this article helpful?