Aligning an object freely along a guide in Illustrator

I have a quick question regarding aligning objects to paths/other objects. Essentially, I have a rounded rectangle with max rounding so that a circle could perfectly fit at either ends. Consequently, that’s exactly what I’m trying to do. After trying several methods to no avail, it came to my attention that maybe I could create a path or guide, and lock an object, like a circle, and slide it along that path. So my question is, does this feature exist, and if not, are there other options that could help me achieve a similar effect?

enter image description here


You can achieve the same thing with a single path using the Appearance panel…

  1. Draw your path…

  2. From the Appearance panel, add a number of strokes: the bottom for the “outline”, the next one a few pt smaller for the “fill” and another on top for the end pieces. Set all the strokes to have round end caps.

  3. For the end circles set the stroke to be dashed with a “0” width dash and the largest gap you can (which should hopefully be longer than your path). Set the dashes to align to corners; this will keep the “dashes” (the circles) at the ends of the path.

Once you’ve finished setting up your appearance you can drag the object to the Graphic Styles panel to save your style for easy reuse:

enter image description here

Source : Link , Question Author : Steven , Answer Author : Cai

Leave a Comment