CAD+ Toolset | Utilities for SOLIDWORKS automation
SOLIDWORKS utilities for improving your productivity in SOLIDWORKS. Automate properties, geometry, export and much more

Demo Download Buy

Command line for running and configuring Batch+


Command line output of Batch+
Command line output of Batch+

batchplus.exe can be found in the installation folder (usually C:\Program Files\Xarial\CAD+ Toolset\batchplus.exe).

Refer the list of available arguments below. Use -- symbol to use arguments. Use --help argument to display help i the console.

For example the below command will open all SOLIDWORKS part files from the D:\Demo\Batch\Models folder and run 2 macros: Macro1.swp and Macro2.swp. SOLIDWORKS 2020 will be started silently and in the background.

> batchplus.exe -i "D:\Demo\Batch\Models" -f "*.sldprt*" -e -m "D:\Demo\Batch\Macros\Macro1.swp" "D:\Demo\Batch\Macros\Macro2.swp" -s silent background -v 2020

Run job with input parameters

Job can be created dynamically with specified input parameters and settings.

Short Flag Flag Required Summary
-i --input No List of input directories or file paths to process. These are files which can be opened by SOLIDWORKS (e.g. SOLIDWORKS files, CATIA, STEP, DXF/DWG, etc.)
-x --inputTxt No Path to a text file which contains list of input directories or file paths to process
-f --filters No Filter to extract input files, if input parameter contains directories. Default (all files): .
-t --toplevelfiles No Option to only process top-level files in the specified folders
-c --confsOrSheets No If specified all configurations or sheets will be processed
-m --macros Yes List of macros to run: VBA macros (.swp or .swb), VSTA macros (.dll) and xCAD macros (.dll) are supported. Use :: to specify arguments
-e --error No If this option is used export will continue if any of the files or formats failed to process, otherwise the export will terminate
-t --timeout No Timeout in seconds for processing a single file (e.g. opening the file and running the macros)
-s --startup No Specifies the startup options (background, safe, hidden) for the host application. Multiple option can be used
-v --hostversion No Version of SOLIDWORKS application. Use one of the following formats: 2020, Sw2020, SOLIDWORKS 2020. If this option is not specified than the oldest version installed on this system will be used.
-q --silent No Suppress popup messages. Default: true
-o --open No Specifies options (readonly, rapid, invisible, forbidupgrade) for the file opening. Default: forbidupgrade
-a --actions No Specifies actions (autosavedocuments) to perform for documents. Default: none
-b --batch No Maximum number of files to process in the single session of CAD application before restarting

Run existing job

Use job verb with the below parameters to run existing *.bpj file from the command line

> batchplus.exe job --run D:\sample.bpj
Short Flag Flag Required Summary
-r --run Yes Full path to *.bpj file to run
--report No Path to the output report file
--log No Path to the output log file

Start with initial document

Batch+ user interface can be started with initial document. Use file verb with the below parameters to start interface with pre-opened file.

> batchplus.exe file --new
Short Flag Flag Required Summary
-n --new No Starts application and creates new file
-o --open No Starts application and opens specified file

Notifications

New version 0.7 is now available for download.
Check What is new page for the list of improvements and new features. This version is fully compatible with SOLIDWORKS 2023 and 2024


Product of Xarial Product of Xarial