Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
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 at 6:08
    
I knew that already, but thanks anyway. ;-) –  adius May 6 at 7:20

2 Answers 2

up vote 1 down vote accepted

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!

share|improve this answer

This is my knowledge based on Sketch 3.

You can select a shape with a right click and do -> Copy CSS Attributes

If you look into the clipboard (e.g. paste it into TextEdit)

  • on a Shape the first line is: /* Path 1: */
  • on the circle the first line is /* Oval 1: */

Hope this helps!

share|improve this answer
    
Unfortunately this is just plain wrong. The comment is just the name of the layer. If you rename the layer it won't help you at all… –  adius Aug 3 at 14:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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