Having trouble exporting a layer within a dynamic block to a DXF

Having trouble exporting a layer within a dynamic block to a DXF

Anonymous
Not applicable
366 Views
1 Reply
Message 1 of 2

Having trouble exporting a layer within a dynamic block to a DXF

Anonymous
Not applicable

Hello everyone, we are relatively new to AutoCAD but we are loving the options that it is giving us. To create files for our CNC machine we need to have a DXF with three layers so that our router recognizes the files. We have the exterior of our case completely partametric so that we can make CNC files much quicker then we had in the past. In order to do this we created Dynamic blocks that are nested within a master block that may contain 6-12 or so dynamic blocks that contain the hole patterns for the CNC files. The dynamic blocks contain the holes on a layer called HOLES. The panel is on the CONTOUR layer and the part names on the TEXT layer. This allows us to export the layers that we need for the CNC. The problem I am having now is that when I freeze all of the layers that are not CONTOUR, HOLES, or TEXT is that I am getting all of the hole patters from the dynamic exported along with the hole pattern that is visible on screen. The question I have is if there is a wy to just export to a DXF just the hole patterns of the current visibility state of the dynamic block that appears in the model space and not all 6-12 hole patterns within the nested block. I understand that this is confusing so I am going to attatch the parametric model and an example of an exported DXF to show what I mean as far as the holes go. EDIT: (I tried attatching the file but it is to large to attach, but I can email it to anyone who would like to play with it. I am currently using a LISP to get out the DXF that I would like, I'm not set on this way, but it's the only thing that seems to be working for me right now. The LISP I think will work, but if I get this working correctly I may not need the LISP. But here it is anyways, this was sourced from the forum and the author was Kent Cooper

 

{code}
(command
"_.dxfout"
(getfiled "DXF File:" "X:/Your/File/Path/" "dxf" 1)
"_Objects"
(ssget)
"" ; completes selection
"" ; non-default number or other option if desired, with followup line(s) if necessary
); end command
{code}

 

 

0 Likes
367 Views
1 Reply
Reply (1)
Message 2 of 2

steven-g
Mentor
Mentor

Because you are just turning layers off, the geometry is still there when you DXF the drawings. For those files you could run the laydel command to delete the HARDWARE layers etc, which would also delete the excessive geometry.

0 Likes