Command line options


The disadvantage of Cutting Planner is that data entry is troublesome. You can have CSV data read by command line option to facilitate data migration from other software such as inventory data and drawings. By using command line options, you can link with other software. See also .recx file specification.

RectPacker.exe "[filename.recx]" /PartsBoard="[filename.csv] "/SourceBoard="[filename.csv]" /Save="[filename.recx] "/ D = [x] / K = [ X] / = R = [x] / H = [x] / Run [] as appropriate.
To accommodate with space, please surround the file name with "".

Input system 1

"Xxxx.recx"
Specify the .recx, xml file to read at startup. It can not be used simultaneously with the option of input system 2.

Input system 2

When reading data in CSV format, each option such as / Problem / K = / R = is also important.
If it is not specified, it will become the setting at the time of the previous termination, so please specify at the same time in order to prevent mistakes.
Text character code is automatic discrimination of Shift-Jis or Unicode text with BOM.

/ Problem = 1D or 2D
Specify one or two dimensions of the optimization problem.

/ PartsPanel = "xxxx.csv"
Specify the member list of CSV format to be read at startup.
Especially if you set individually whether to rotate parts, the information will be lost unless / R = 2.

/ StocksPanel = "xxxx.csv"
Specify the original list of CSV format to be read at startup.
 
/ FirstUsageStocksPanel = "xxxx.csv"
Specify the CSV format priority material list to be read at startup.

/ D = x
Specify the number of digits of the decimal part with a value from 0 to 2.
If not specified, it is set based on data of CSV specified at the same time.

/ K = x
Specify the clamp dimension. The value range depends on the number of digits of the decimal part specified by / D =.
If not specified, the value at the time of the last termination is set.

/ R = x
Whether or not to rotate is enabled = 0 No = 1 Individual = 2.
Especially if there is information of individual setting in the CSV file of the member list, that information will be lost unless / R = 2.
If not specified, the value at the time of the last termination is set.

/ SearchLevel = x
When the placement search level is not specified, the value at the time of the last termination is set.

/ CutTableLength = x
Maximum cut length of cutting machine · Unlimited unlimited

/ MinimumSearchTime =
Minimum search time. The unit is seconds.

Output system

/ Run
Execute placement calculation immediately after starting. After ending, we immediately close the application, so combine it with the save option below.
Use the above options for input.

/Save="xxxxxx.recx "or" xxxxxx.xml "
In combination with / Run, specify the save destination of the placement calculation.

/SavePartsData="xxxxxx.csv "
/ Run and output the same contents as [File] - [Export] - [Deployed Member List] menu.
1D - member number, length, number of sheets, comment, unit price, unassigned number of sheets
2D - member number, horizontal, vertical, number of sheets, turnable / not allowed, comment, unit price, unassigned number of sheets
It is CSV format which consists of.

/SaveStocksData="xxxxxx.csv "
/ Run and output the same contents as [File] - [Export] - [Placed original list] menu.
1D - original number, length, number of sheets used, comment, unit price, priority use material
2D - original number, horizontal, vertical, number of used sheets, comment, unit price, priority material used
It is CSV format which consists of.

/SaveRemnantsData="xxxxxx.csv "
/ Run and output the same contents as [File] - [Export] - [Material List] menu.
1D - Length, number of sheets
2D - Horizontal, Vertical, Number of Sheets
It is CSV format which consists of.

/ErrorLog="xxxxxx.txt"
There is a mistake in the command option of the text file, and the contents of the aler are output.
If the specified file exists, the content is added at the end.
Character codes follow the / Encoding = option. Please refer to the exit code.

/ Encoding =
Specify the character code of the CSV file. It is one of the following. Shift-Jis specifies ANSI. Unspecified is ANSI (Shift-Jis).
ANSI
ASCII
Unicode
BigEndianUnicode
UTF 8
UTF 7

Exit Code

If it can not be executed normally due to an error in specifying the command line option, a value other than 0 is returned in the exit code.
Below is a sample of the value of the exit code and its contents and usage. Only one exit code will be issued. If you want to obtain multiple exit codes, use the /ErrorLog = option.

@echo off
RectPacker.exe /Problem=2D /PartsPanel="parts_test.csv" /StocksPanel="stocks_test.csv" /D=1 /K=3 /R=1 /Run
if %ERRORLEVEL% == 11 echo Optimizer was be forcibly terminated.
if %ERRORLEVEL% == 21 echo You do not have a license for this software.
if %ERRORLEVEL% == 31 echo There are uncut parts."
if %ERRORLEVEL% == 51 echo Invalid value: /Problem=
if %ERRORLEVEL% == 52 echo Invalid value: /D=
if %ERRORLEVEL% == 53 echo Invalid value: /K=
if %ERRORLEVEL% == 54 echo Invalid value: /R=
if %ERRORLEVEL% == 55 echo Invalid value: /SearchLevel=
if %ERRORLEVEL% == 56 echo Invalid value: /CutTableLength=
if %ERRORLEVEL% == 57 echo Invalid value: /MinimumSearchTime=
if %ERRORLEVEL% == 58 echo Invalid value: /P
if %ERRORLEVEL% == 111 echo File does not exist. : /PartsPanel=
if %ERRORLEVEL% == 112 echo Some values in the list are out of range. : /PartsPanel=
if %ERRORLEVEL% == 113 echo Invalid data. : /PartsPanel=
if %ERRORLEVEL% == 121 echo File does not exist. : /StocksPanel=
if %ERRORLEVEL% == 122 echo Some values in the list are out of range. : /StocksPanel=
if %ERRORLEVEL% == 123 echo Invalid data. : /StocksPanel= /FirstUsageStocksPanel=
if %ERRORLEVEL% == 131 echo File does not exist. : /FirstUsageStocksPanel=
if %ERRORLEVEL% == 132 echo Some values in the list are out of range. : /FirstUsageStocksPanel=
if %ERRORLEVEL% == 201 echo Invalid value: /Encoding=
if %ERRORLEVEL% == 211 echo Calculated Parts panel data could not be output.
if %ERRORLEVEL% == 212 echo Calculated Stocks panel data could not be output.
if %ERRORLEVEL% == 213 echo Could not the output of the remaining material data.
if %ERRORLEVEL% == 221 echo Error code list output failed.
pause

How to use command line options with Windows store application version

Originally can not use the command line option for the store application.
It can be used by using "Cutting Planner CMD Support tool".

Usage:
Download from the link above.
Place CuttingPlannerCMD.exe and StartCuttingPlanner.bat in the same folder.
Execute with CuttingPlannerCMD.exe with command line option.