Copy link to clipboard
Copied
Is it possible to get the position data of the point shown in the screenshot?
yes, replace your symbol with another one that has center registration point, get center point, replace symbol back with your original symbol.
Copy link to clipboard
Copied
yes, replace your symbol with another one that has center registration point, get center point, replace symbol back with your original symbol.
Copy link to clipboard
Copied
Thank you very much! Everything is working!
As an example:
var item = selection[0],
bakupSymbol = item.symbol,
newSymbol = activeDocument.symbols.add(item, SymbolRegistrationPoint.SYMBOLTOPLEFTPOINT);
// replace symbol
item.symbol = newSymbol;
// set position
var position = [
item.left,
item.top
];
// restore symbol
item.symbol = bakupSymbol;
newSymbol.remove();
alert(position);
Find more inspiration, events, and resources on the new Adobe Community
Explore Now