As the title says, I want to draw a circle of a specific diameter at a specific location, and its unit is mm, but I don’t know how to do it… I tried batchPlay, but it doesn’t seem to be able to specify the size unit as mm, the default is PX
Hi hmingv,
Try using “millimetersUnit” instead of “pixelsUnit”. If that doesn’t work you could try converting your mm values to pixels using this:
const resolution = app.activeDocument.resolution;
const pixelsPerMM = resolution / 25.4;
// Convert millimeters to pixels
const x = xMM * pixelsPerMM;
const y = yMM * pixelsPerMM;
const width = widthMM * pixelsPerMM;
const height = heightMM * pixelsPerMM;