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

how to coding :) [get Clipping Mask visible bounds]

Explorer ,
Sep 10, 2022 Sep 10, 2022

25976853bt3d_0-1662565539978.png

 

TOPICS
Scripting
316
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
Adobe
Guide ,
Sep 10, 2022 Sep 10, 2022

Are you trying to read the position of the green path?  Or are you trying to set the position of the group so that the position of the green path is, for example, (0, 0)? 

 

Assuming your hierarchy is this:

  • group (selection 0)
    • group, clipped (selection 0.group 0)
      • red path (selection 0.group 0.path 0)
      • yellow path (selection 0.group 0.path 1)
    • green path (selection 0.path 0)

 

To read the position of the green path:

alert(app.selection[0].pathItems[0].position);

 

To set the position of the group so that the position of the green path is, for example, (0, 0):

var X = app.selection[0].pathItems[0].position[0] - app.selection[0].position[0];
app.selection[0].position = [0 - X, 0];

 

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
Explorer ,
Sep 10, 2022 Sep 10, 2022

set the position of the group to (0,0)

get position.x => -133 😞

i need 

 

set the position of the group to (0,0)

get position.x => 0

get position.y => 0

🙂

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
Guide ,
Sep 10, 2022 Sep 10, 2022
LATEST

@冯25976853bt3d  Rather than repeat the question, you need to clarify the question and the premises that underlie the question. 

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
Community Expert ,
Sep 10, 2022 Sep 10, 2022
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