The Spaces from Rooms command is designed for batch creating spaces from rooms using a linked file. All required space parameters are automatically populated.
Download the BIM2B plugin for Revit 2021 ADSK templates: http://bim2b.ru/adsk
Learn more about the plugin: http://bim2b.ru/bim2b-template-tools