Skip to main content
This topic has been closed for replies.
Correct answer CarlosCanto

yes, replace your symbol with another one that has center registration point, get center point, replace symbol back with your original symbol.

1 reply

CarlosCanto
CarlosCantoCorrect answer
Adobe Expert
October 23, 2018

yes, replace your symbol with another one that has center registration point, get center point, replace symbol back with your original symbol.

Alexander Ladygin
Inspiring
October 24, 2018

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);