How do I change how onshape names my sheet metal flat patterns when I export them?

example:

I export a flat pattern to DXF to nest and cut on a laser table.

the file is exported as the project name, great, and then the files show as "project name - Flat Pattern of Part name"

I would like the files to just be named "Part name"

Tagged:

Answers

  • Kevin_Cowles
    Kevin_Cowles Member, Onshape Employees Posts: 89 image

    Configure this in Export Rules, either under your User Account Settings or Company Account Settings (if you're on Pro or Enterprise)

    Good tech tip here: https://www.onshape.com/en/resource-center/tech-tips/tech-tip-how-to-set-up-export-rules-in-onshape

  • DLMFAB
    DLMFAB Member Posts: 2 PRO

    Ran into something similar, easiest way is to write a shell script to remove the "flat pattern" ask chat gpt if you need help.

    Here is a close example

    #!/bin/bash

    Removes "Flat pattern" (and extra spaces) from DXF filenames in your export folderChange this to your export folder path:

    FOLDER="$HOME/Downloads/OnshapeExports"

    cd "$FOLDER" || exit

    Loop through matching files and rename them

    for file in "Flat pattern"; do
    newname="${file//Flat pattern/}"
    newname="${newname// / }" # remove double spaces if any
    mv "$file" "$newname"
    echo "Renamed: $file → $newname"
    done

    echo " Done cleaning DXF filenames."