1

I have a circle-like path in Sketch. How can I now see if it's really a circle (i.e it was created with the Oval tool) or if it's just a path with the shape of a circle. They look the same and all the settings are the same, but when I export them to an SVG file the circle will be translated to a circle-tag and the path will be translated to a path-tag, which is a great difference.

Is there a way to differentiate them at all?

  • just a tip.....while you make a circle with oval tool....press shift and make.....it will come perfect circle... hope it helps :) – Aby May 5 '14 at 6:08
  • I knew that already, but thanks anyway. ;-) – adius May 6 '14 at 7:20
2

You can do that easily via a plugin that checks what selectedLayer.layers().objectAtIndex(0).className() looks like.

Just copy and paste the following into the Plugins › Custom Plugin window, hit Save… and give it a nice name like Is this a circle? :)

try {
  var c = selection[0].layers().objectAtIndex(0).className()
  if(c == "MSOvalShape") {
    [doc showMessage:"Selected layer is a circle"]
  } else {
    [doc showMessage:"Selected layer is NOT a circle"]
  }
} catch(e) {
  [doc showMessage:"Selected layer is NOT a circle"]
}

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.