Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to add a layer to default .dxf template

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
426 Views, 2 Replies

How to add a layer to default .dxf template

I do a lot of sheet part design and create .DXFs for our burn table. I design in Solidworks and export flat patterns as a .DXF but I need to go into AutoCAD to change the layer to "cut" so the burn table can use the file. Every time I open a .DXF I have to create the "cut" layer. Is there a way that I can add this "cut" layer to appear by defult in the layers box? I know you can save a template but when Im opening dxf files it just uses a defult template. I just want to be able to modify the defult .dxf template so I dont have to add a "cut" layer 20 times a day.

thanks

2 REPLIES 2
Message 2 of 3
dbroad
in reply to: Anonymous

Can't you create the layer in solidworks?

 

DXF files do not use templates.  Opening them is like opening drawings.  You can process a dxf with a program to add a layer without opening AutoCAD but not with AutoLISP.

 

If you will be opening each dxf anyway, just create or add this to your acaddoc.lsp:

 

(command "_.-layer" "n" "cut" "")

if you want to create the layer

 

If you want to rename a layer (other than defpoints or 0), then 

(command "_rename" "la" "<oldlayername>" "cut" "")

 

When you saveas dxf, the layer settings will be changed.

 

Be more specific about what you need if either of those don't meet your requirements.

Architect, Registered NC, VA, SC, & GA.
Message 3 of 3
Anonymous
in reply to: dbroad

When I make the dxf from solidworks I don't do it from the drawing with the layers. There is an option in the modeling to convert flat pattern to dxf which keeps the size correct and I dont have to scale it from the drawing when I open it in autocad.

I guess using that command is a little faster than creating the cut layer every time. Seems like there should be a way to add to the defult layers though. The 0 layer is the only one there when I open the dxfs, dont see why there cant be a 0 and a cut one.

Could that program you mentioned change the current layer of the dxf? or does it just add a layer?

 

thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost