Skip to main content
Participant
January 24, 2020
Answered

Convert multiple rectangle shapes to paths/lines for chart

  • January 24, 2020
  • 3 replies
  • 3502 views

I have a very, very large bar chart that was sent to me as a PDF to design. One thing I need to do is convert the rectangular bars (in pink) into lines with an end cap. Is this possible to do to multiple rectangles at once? I have literally hundreds of bars to do this to, so manually deleting anchor points on each one is NOT an option.

 

The first example, which has all bars as rectangular shapes, needs to be converted into something like the second example, which has the pink bars as lines with endcap "arrowheads":

Correct answer wesley37130522z5bq

Thank you! im currently going ham with multiple scripts, hoping i can find one that keeps the rotation of the original object in mind so i can replace the brush circles with a finished symbol and they all rotated inwards!:O Thank you Ton!

3 replies

wesley37130522z5bqCorrect answer
Inspiring
May 2, 2024

Thank you! im currently going ham with multiple scripts, hoping i can find one that keeps the rotation of the original object in mind so i can replace the brush circles with a finished symbol and they all rotated inwards!:O Thank you Ton!

Kurt Gold
Community Expert
Community Expert
January 26, 2020

Just to suggest another possible route: You can also do it with an action that will work in many situations (see sample .aia file below).

 

https://drive.google.com/open?id=1zUk_ZTFnKEJmMgduplASbdFzrWbPE3XX

 

Instruction:

 

- Unzip the zipped .aia file and import it into the Actions palette.

 

- Select an unlimited number of filled, ungrouped and unrotated rectangles.

 

- Play back the action.

kphotopage
Legend
January 26, 2020

Hi Kurt,

 

I’ll give that a try.

 

Decades ago, I wrote many Actions using Photoshop, then much less writing Actions using Illustrator,  . . . InDesign, well never look into if have. 

 

K

Ton Frederiks
Community Expert
Community Expert
January 24, 2020

You could use a script to swap the rectangles for a stroke (and while still selected adjust the stroke to the same size):

http://illustrator.hilfdirselbst.ch/dokuwiki/en/skripte/javascript/zamena_size

Participant
January 24, 2020

Thanks! I gave it a try, but so far as I can tell, it only converts the rectangle into an outlined rectangle. What I really need is to somehow delete 2 of the 4 anchor points on each rectangle first. to turn each one into a straight line. Seems like it should be such a simple task, but so far every solution I've found recquires that to be done manually on each object.

Ton Frederiks
Community Expert
Community Expert
January 24, 2020

Try again, it should work.