Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to get SymbolRegistrationPoint position?

Participant ,
Oct 22, 2018 Oct 22, 2018

Is it possible to get the position data of the point shown in the screenshot?

symbolpoint.png

TOPICS
Scripting
593
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 23, 2018 Oct 23, 2018

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

Translate
Adobe
Community Expert ,
Oct 23, 2018 Oct 23, 2018

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 24, 2018 Oct 24, 2018
LATEST

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

2018-10-24_12-54-08.gif

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines