|
<< Click here to view the full document >> Export > Custom Exports |
Custom Exports let you export cutting plans and other data to CSV or XML files, or send data to physical or virtual serial ports. To open it, select File > Export > Custom Exports or press Ctrl+E.
The supplied exports are ready to use: Plan to XML exports an entire cutting plan, including its cutting layouts, while Layout parts, Plan stocks, and Material stocks export the corresponding data to CSV. These exports are also available directly under File > Export.
You can use the supplied exports, modify them, or create your own. Custom SQL queries let you select which data to export and how to arrange it to suit other applications or production equipment. Creating or modifying export queries requires knowledge of SQL.
Exports can run manually or automatically when a plan is optimized, opened, or closed. Frequently used exports can also be made available under File > Export.
To restore a deleted or modified supplied export, click Refresh (the rightmost navigator button) and select its template. This creates a new custom export using the original SQL.

Export name
Name of the export. Exports with the same name run together when any one of them is run. When comparing export names, the program ignores // and everything after it.
Format
•xml (plan): Exports the cutting plan, including cutting layouts, to an XML file.
•csv: Exports the results of a custom SQL query to a CSV file.
Output file
Name of the output file. You can use the tokens listed below to generate the filename.
Run mode
•Manual: Runs when you click Run or press Ctrl+Enter.
•Manual in menu: Also makes the export available under File > Export.
•Auto after plan optim: Runs automatically after a plan is optimized.
•Auto after plan close: Runs automatically after a plan is closed.
•Auto after plan open: Runs automatically after a plan is opened.
Write mode
•Rewrite: Replaces the contents of the output file.
•Append: Adds the exported data to the end of the output file.
Blank line
Inserts an empty line between exported data blocks. Applies to CSV exports only.
Private
Makes the export visible only to the user who created it. Useful when multiple users share a network database.
Options
Run: Use to launch an external application or batch file. For example: Run=c:\mybatch.bat.
The following options apply to CSV exports:
Delimiter: Character used to separate fields.
Quote: Character used to enclose fields containing the delimiter. To enclose every field, enter the character twice, for example Quote="".
Header: Controls whether field names are included: 0 = no field names; 1 = included once; 2 = included with each appended data block.
BOM: Controls whether the file includes a byte order mark: 0 = omitted; 1 = included. Use 1 to help Excel recognize the file encoding and display accented characters correctly.
SQL
SQL query that selects the data to export. For example:
select * from Plans
You can also define fixed header and footer text using ExpHead and ExpFoot comments:
/* ExpHead
This is my constant header line 1.
This is my constant header line 2.
*/
/* ExpFoot
This is my constant footer line 1.
This is my constant footer line 2.
*/
select * from Plans
Tokens for the output filename
%docs% |
Standard export folder: C:\Users\<user>\Documents\CutLogic 1D\ |
%date% |
Current date in yyyy-mm-dd format |
%time% |
Current time in hh-nn-ss format |
To send the output to a physical or virtual serial port, enter COM in Output file. Configure the connection under Tools > Options > Serial port.
Tokens for the output filename and SQL query
These tokens refer to the currently selected record.
ActPlanID |
ID of the selected plan |
ActMatID |
ID of the selected material |
ActStorID |
ID of the selected storage |
ActAssemID |
ID of the selected assembly |
ActPlanNum |
Number (#) of the selected plan |
ActMatNum |
Number (#) of the selected material |
ActPlanDes1 |
Description of the selected plan |
ActMatDes1 |
Description of the selected material |
For stock or part, insert Part or Sou before ID, for example ActMatSouID or ActPlanPartID.
Tokens for SQL queries
ActPlanIDs |
IDs of all selected plans. |
ActIDs |
IDs of all selected records in the active list. |
Field-name suffix for SQL queries
Add suffix _l to result column names or aliases to convert length values from the internal database format to the format configured in CutLogic 1D.
For example total length: select sum(Len * Cnt) SumLength_l from Parts
Functions
Click Export or press Ctrl+Enter to run the selected export.
Click Insert to insert a token into the SQL query.
Click Copy to copy the export result to the clipboard.
Custom Exports support multiple selected records. For example, if you select five plans and then run an export, all five plans are included.