Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Illustrator script that resizes/changes object Height to the same as object Width

New Here ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

Hi,

 

For a design im making i have multiple circles or ellipses that are of varied sizes - id like to change the height to equal the width so that all are perfect circles. 

Is there any script out there that you know of that can help do this? 

 

Is this possible?  ThanksScreenshot 2021-10-22 at 19.41.59.png

TOPICS
Scripting

Views

124

Likes

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

Adobe Community Professional , Oct 22, 2021 Oct 22, 2021
function makeOvalsIntoPerfectCircles() { var doc = app.activeDocument; var items = doc.pageItems; var centerPoint; var curItem; for(var x=0;x<items.length;x++) { curItem = items[x]; centerPoint = [curItem.left + curItem.width/2,curItem.top - curItem.height/2]; curItem.height = curItem.width; curItem.position = [centerPoint[0] - curItem.width/2,centerPoint[1] + curItem.height/2]; } } makeOvalsIntoPerfectCircles();

Likes

Translate

Translate
Adobe Community Professional ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

function makeOvalsIntoPerfectCircles()
{
	var doc = app.activeDocument;
	var items = doc.pageItems;

	var centerPoint;

	var curItem;
	for(var x=0;x<items.length;x++)
	{
		curItem = items[x];
		centerPoint = [curItem.left + curItem.width/2,curItem.top - curItem.height/2];
		curItem.height = curItem.width;
		curItem.position = [centerPoint[0] - curItem.width/2,centerPoint[1] + curItem.height/2];
	}
}
makeOvalsIntoPerfectCircles();

Likes

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
New Here ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

 Works and has amazed me and i send you a huge huge thank you DilliamWowling - a gentleman to the extreme

Likes

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
Adobe Community Professional ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

And it works for rectangles too!

Likes

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
Adobe Community Professional ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

My versatility and genius are unmatched. That's why they pay me the big bucks....

 

🤔😐😳😢😭

Likes

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
Adobe Community Professional ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

That is probably true for most of us 🙂

Likes

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
Adobe Community Professional ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

LATEST
quote

My versatility and genius are unmatched. That's why they pay me the big bucks....

 

🤣🤣🤣🤣 8)

Likes

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