Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Hi Kurt,
I am using Illustrator 24.0.2.
By "object," I mean vector drawings in an EPS file.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now