Looking at the datasheet of this component, can you group together pins by their functions? for example for Power, 3v3, gnd_1 gnd_2 etc
NOTE: If you group them, can you not add the same pin if you already added them in a group? You should know which pin function is common for its function
I grouped the STM32F103C8T6 LQFP-48 pins into non-overlapping functional groups: Power/3.3V, Ground, Clock, Control, GPIO Port A, GPIO Port B, and GPIO Port C. Full grouping is in the STM32F103C8T6 Pin Function Groups project file.