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

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

340

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

Community Expert , 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();

Votes

Translate

Translate
Adobe
Community Expert ,
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();

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

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

Copy link to clipboard

Copied

And it works for rectangles too!

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 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....

 

🤔😐😳😢😭

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

Copy link to clipboard

Copied

That is probably true for most of us 🙂

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

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