Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Anonymous
3709 Vistas, 3 Respuestas

DXF with specific origin

We use Acad17. Is it possible to create DXF file, using DXFOUT, with the select objects option and have the DXF created with the bottom left point at 0,0. We have a new Cam package and it's proving to be a hassle to edit each DXF and move the objects to 0,0. Our old program imported the DXF and automatically centered it on the created panel.

TheCADnoob
en respuesta a: Anonymous

Have you tried just saving the dwg using save as?

 

CADnoob save as format.png

CADnoob

EESignature

process_solutions
en respuesta a: TheCADnoob

(Defun C:SET_DXF_ORIGIN ()

(setvar "treedepth" (getvar "treedepth"))
(COMMAND "ZOOM" "EXTENTS" "REGEN")
(setvar "treedepth" (getvar "treedepth"))

(setvar "INSBASE" (Getvar "Extmin"))

(princ)

)

 

 

Run the above to set the insertion base of the dwg to the lowest left point, or literally type

INSBASE

0,0,0

 

IF 0,0 is exactly where the origin should be, but if the data is not already located with the extmin at 0,0 it may be necessary to move the data to 0,0... I use the following regularly:

 

(defun c:Relocate_to_Origin ( / osmodewas)
(setq osmodewas (getvar "OSMODE"))
(setvar "osmode" 0)
(setvar "VTENABLE" 7)
(setvar "treedepth" (getvar "treedepth"))
(command "zoom" "extents" "REGEN")
(setvar "treedepth" (getvar "treedepth"))
(command "-layer" "unlock" "*" "" "move" "all" "" (getvar "extmin") "0,0")
(setvar "treedepth" (getvar "treedepth"))
(command "zoom" "extents")
(setvar "treedepth" (getvar "treedepth"))
(setvar "osmode" osmodewas)
(setvar "VTENABLE" 3)
(princ)
)

 

Hope these ideas help.

 

Regards,

Sean

 

 

 

 

 

Anonymous
en respuesta a: process_solutions

Thanks guys

  Using saveas won't work, I just need specific parts of the drawing DXF'd

I tried the code as well, seems to work great. I was just hoping there was a parameter some where that would do it without adding extra steps. As you all know, if I need 20 DXF's out of 1 drawing every step counts.

Thanks again

Really appreciate the quick responses.