1
Participant
,
/t5/illustrator-discussions/script-to-pathitem-convert-to-rectangle-and-expand-appearance/td-p/14610016
May 10, 2024
May 10, 2024
Copy link to clipboard
Copied
Hi there,
how to write script to below three steps for pathitem , thanks
pathitem .CONVERT_TO_RECTANGLE;
script to step2 and step3
artb.add(pathitem.geometricBounds);
step1,
step2
step3
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Expert
,
May 10, 2024
May 10, 2024
- What ist your Illustrator version?
- Why so complicated?
Please try it with a newer version (open document and one pathItem required)
var aDoc = app.activeDocument;
var pItBds = aDoc.pathItems[0].geometricBounds;
aDoc.artboards.add ([ pItBds[0], pItBds[1], pItBds[0]+(pItBds[2]-pItBds[0]), pItBds[1]+(pItBds[3]-pItBds[1]) ])
Does that makes sense for you?
Explore related tutorials & articles
Community Expert
,
/t5/illustrator-discussions/script-to-pathitem-convert-to-rectangle-and-expand-appearance/m-p/14610507#M407163
May 10, 2024
May 10, 2024
Copy link to clipboard
Copied
- What ist your Illustrator version?
- Why so complicated?
Please try it with a newer version (open document and one pathItem required)
var aDoc = app.activeDocument;
var pItBds = aDoc.pathItems[0].geometricBounds;
aDoc.artboards.add ([ pItBds[0], pItBds[1], pItBds[0]+(pItBds[2]-pItBds[0]), pItBds[1]+(pItBds[3]-pItBds[1]) ])
Does that makes sense for you?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
rui huang
AUTHOR
Participant
,
/t5/illustrator-discussions/script-to-pathitem-convert-to-rectangle-and-expand-appearance/m-p/14613573#M407280
May 12, 2024
May 12, 2024
Copy link to clipboard
Copied
You've been a great help. Thank you for sharing your knowledge and solving my problem.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/illustrator-discussions/script-to-pathitem-convert-to-rectangle-and-expand-appearance/m-p/14613987#M407287
May 13, 2024
May 13, 2024
Copy link to clipboard
Copied
You're welcome.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

