Editing dxf files

If I open and edit a dxf then hit save I do not want to be prompted to "Save Drawing As" a dwg file.
I just want to save the dxf.
Changing the default Save format is not an option as we work with both dwg and dxf daily.
Is there an option/setting that I am not aware of?
cheers

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • You could achieve this using some LISP. The function below will switch the SaveFormat automatically as you switch between drawings.

    ; SetSaveFormat
    ; Sets the save format to match the current drawing extension
    
    (defun SetSaveFormat ( / ext)
        (setq ext (strcase (acet-filename-extension  (getvar 'DWGNAME)))) ; retrieve the current drawing file extension
            (cond ((= ".DXF" ext)
                            (setvar 'SaveFormat 5) ; If drawing is DXF, set saveformat to 2013 .DXF
                            (princ "\nSave format set to .DXF")
                        )
                        (T (setvar 'SaveFormat 4) ; Otherwise set saveformat to 2013 .DWG
                             (princ "\nSave format set to .DWG")    
                        ) 
            )
        (prin1)
    )
    
    ; Set a reactor to call SetSaveFormat each time the current drawing is changed
    (vlr-docmanager-reactor nil '((:vlr-documentBecameCurrent . SetSaveFormat)))
    
    (SetSaveFormat) ; auto run on loading

    To use, you would either include in your on_doc_load.lsp, or set to load automatically with APPLOAD.

    Regards,
    Jason Bourhill
    BricsCAD V21 Ultimate
    CAD Concepts

  • Thanks Jason, this is exactly what I was looking for.

  • @Jason Bourhill
    NICE!!!!
    well done, thanks.

  • Hi Jason
    It might be something on my system but if I save an open DWG as a DXF you would think that SSF would then save it as DXF next save - but it doesn't. SSF is auto loaded at the start of each session and does give the right save settings for DXFs and DWGs that are open, but after I save a DWG as a DXF it persists in trying to save as a DWG subsequently. This is unfortunate because that is exactly how my work flow goes - I draw my parts in DWG, then purge all non-essential elements to produce a clean DXF for CNC - this DXF might be tweaked and re-saved several times before it's finalised. SSF seems to ignore its new file type though.
    If I close the DXF then open it, then save again it silently saves as it a DXF.
    Cheers
    Jeremy
  • Update the LISP to include a check when the drawing file is saved.
    ; SetSaveFormat
    ; Sets the save format to match the current drawing extension
    
    (defun SetSaveFormat ( / ext)
    	(setq ext (strcase (acet-filename-extension  (getvar 'DWGNAME)))) ; retrieve the current drawing file extension
    		(cond ((= ".DXF" ext)
    						(setvar 'SaveFormat 5) ; If drawing is DXF, set saveformat to 2013 .DXF
    						(princ "\nSave format set to .DXF\n")
    					)
    					(T (setvar 'SaveFormat 4) ; Otherwise set saveformat to 2013 .DWG
    						 (princ "\nSave format set to .DWG\n")	
    					) 
    		)
    	(prin1)
    )
    
    ; Set a reactor to call SetSaveFormat each time the current drawing is changed
    (vlr-docmanager-reactor nil '((:vlr-documentBecameCurrent . SetSaveFormat)))
    
    ; Set a reactor to call SetSaveFormt each time the drawing is saved
    (vlr-editor-reactor nil '((:vlr-saveComplete . SetSaveFormat)))
    
    
    (SetSaveFormat) ; auto run on loading
    Regards,
    Jason Bourhill
    BricsCAD V22 Ultimate
    CAD Concepts
  • Thanks Jason that has fixed it
    Cheers
    Jeremy

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.