# Get Circle's (Arc) X And Y Coordinates And Display Dimension Name With API

Question asked by Aj Jones on Jul 23, 2015
Latest reply on Jul 28, 2015 by Aj Jones

I have one sketch that has multiple circles drawn in it.  Each circle has a dimension for it, and the dimensions are named by letters (A, B, C, D, etc.)  I'm looking to see if anyone knows a way for me to get a circle's (arc) radius, and x and y coordinates from the origin, and the name of the dimension that is attached to it.  My end goal is to be able to run my program and have it output something like:

Circle A: Radius = 3; X Coordinate From Origin = 5; Y Coordinate From Origin = 8

Circle B: Radius = 2.5; X Coordinate From Origin = -5; Y Coordinate From Origin = 3

Circle C: Radius = 7; X Coordinate From Origin = 2; Y Coordinate From Origin = -8

I've tried this by iterating through the display dimension names in the sketch, but then I don't know how to get the center point locations of the arcs they are attached too.  I've also tried from the other direction, by finding all of the arcs in the sketch, and I've been able to get the center points and radius for each arc, but then I can't find the name of the dimension attached to them using:

SldWorks.SketchArc.GetCenterPoint2

SldWorks.SketchPoint.X

SldWorks.SketchPoint.Y

Does anyone know a way I can loop through the display dimensions, or Arcs in the sketch and get the dimension name, x & y coordinates from the origin of the entire model to the circle (arc) center, and radius?

Thanks