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

Automatically set margins for rectangles around multiple objects.

Explorer ,
Jan 27, 2020 Jan 27, 2020

I would like to create an Illustrator macro that draws a rectangle around an object while maintaining a specified margin of distance between object and border--regardless of the object's size.

Does anyone know if this is possible?

TOPICS
Draw and design
675
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
Community Expert ,
Jan 27, 2020 Jan 27, 2020

There may be several ways to do that.

 

Which version of Illustrator are you using? Also, can you specify what you mean by "object"? Any kind of object? Specific objects? Or something else?

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 ,
Jan 27, 2020 Jan 27, 2020

Hi Kurt,

I am using Illustrator 24.0.2.

By "object," I mean vector drawings in an EPS file.

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 ,
Jan 27, 2020 Jan 27, 2020

You may select one of the (linked) objects and then:

 

- In the Appearance palette, add a new stroke.

- Highlight the new stroke item in the palette.

- Effect > Convert to Shape > Rectangle: Choose the desired relative width and height settings.

- While the object is selected, go to the Graphic Styles palette and create a new graphic style out of it.

- Now you can select multiple objects and apply the style in one whack.

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 ,
Feb 04, 2020 Feb 04, 2020

I appreciate your answer, Kurt. However, I performed these steps and I must be misinterpreting a step.

 

First, I create a new stroke.

Next, I select Effect > Convert to Shape > Rectangle. Default settings are fine, so I click OK.

But when you say "while the object is selected," what object do you mean? Other than the vector drawing I have open, I have not yet created an oject.

 

I haven't used the Appearance or Graphic Styles palettes very often, so my knowledge is limited.

 

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 ,
Feb 04, 2020 Feb 04, 2020

Without seeing one of your files it is rather difficult to tell what is going wrong.

 

Can you share a sample file and – if required – include some further instructions?

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 ,
Mar 25, 2020 Mar 25, 2020
LATEST

I apologize for disappearing for a while; I just couldn't come up with a way to show what was going on. I've since familiarized myself with saving a new graphic style, and also have created a time-saving keyboard shortcut. Although I never did figure out how to create a macro to do everything, these solutions are saving me many extra steps.

Kurt, thank you again for your time and advice.

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