Copy link to clipboard
Copied
i used C# create script tool
double x = 719.222222222219;
double y = -49.370370370369528;
app.ActiveDocument.Selection[0].Position = new object[2] { x, y };
the file is https://oss.tlxfif.com/test.ai
thanks
🙂
version 2021
Copy link to clipboard
Copied
the question reason is 'clipping mask'
Copy link to clipboard
Copied
if Selection[0] is a clipped group then you'll have to find the Clipping Path, find its position, get the difference between clipping path position vs clipping group position and adjust accordingly.
Copy link to clipboard
Copied
how to get X,Y ? pleeeeeeease...
Copy link to clipboard
Copied
var left = selection[0].position[0];
var top = selection[0].position[1];
to get the Center coordinates, add half of the Width and half of the Height
Copy link to clipboard
Copied
if groupItem Clipped equal true
get position contain hidden path;
😞
Copy link to clipboard
Copied
if groupItem Clipped equal true
then, you'll have to loop through all pathItems inside the group and check for their "clipping" property. Once you find the pathItem with "clipping = true" then that's the clipping path (invisible path)
let me know if you any issues getting this code done, we'll help you if you get stuck
Copy link to clipboard
Copied
very thanks;
i am a chinese,english not good.
😞
Copy link to clipboard
Copied
help.....
Copy link to clipboard
Copied
or how to get center[x] and center[y]?