Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Changing line color of exported DXF

SebastianMaklarySebastianMaklary Member Posts: 3 PRO

Hi there.
I just solved a problem I had and wanted to share the solution. 

The problem is that while DXF exports of sheet metal parts can include visible sketches, these are all exported in the same color, which is an issue when we send the files off to lasercutting as the lasercutter will cut all white lines and engrave all yellow lines. In Solidworks, it was possible to set colors during export but this option is not given in Onshape.

Luckily, Onshape puts the visible sketches in a separate layer in the DXF so here's the solution:

Open the .DXF in notepad.

Search for the word “MODELSKETCH_VISIBLE” as this is the name of the layer that includes the visible sketches.

Look for the number 7 and change this to the number 2.In my case, the number to be changed was indented on the 4th line below the layer name but I don't know if this is always the case. If you want other colors, then here is a list of AutoCAD color codes: https://gohtx.com/acadcolors.php

Save the .DXF file again.

The reason for why this works is that AutoCAD (who made the DXF standard) uses 7 as the index for white lines and 2 as the index for yellow lines.

Also possibly relevant is that I save the DXF with "Release 14" selected in version.

Sign In or Register to comment.