In 1705 during the Siege of Barcelona he was in overall command of the artillery batteries that successfully bombarded the city into surrender. During the siege he also accompanied the assault on the heights of Mountjuic Castle.