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

create triangle with scripting

Guest
Oct 17, 2012 Oct 17, 2012

Copy link to clipboard

Copied

Hi,

does someone know how to create a triangle with (x1,y1)(x2,y2) and (x3,y3) positions?

For a rectangle i found this:

app.activeDocument.rectangles.add({geometricBounds:[0, 144 , 214, 500] } )

But this is not working for a triangle?

Please Help

TOPICS
Scripting

Views

678

Translate

Translate

Report

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

Advisor , Oct 17, 2012 Oct 17, 2012

try

app.activeDocument.polygons.add

http://jongware.mit.edu/idcs5/pc_Polygons.html#add

Votes

Translate

Translate
Advisor ,
Oct 17, 2012 Oct 17, 2012

Copy link to clipboard

Copied

try

app.activeDocument.polygons.add

http://jongware.mit.edu/idcs5/pc_Polygons.html#add

Votes

Translate

Translate

Report

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 ,
Oct 17, 2012 Oct 17, 2012

Copy link to clipboard

Copied

LATEST

Or:

create a rectangle and convert it to a triangle with:

myRectangle.convertShape(ConvertShapeOptions.CONVERT_TO_TRIANGLE);

Uwe

Votes

Translate

Translate

Report

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