Std Enregistrer une copie

From FreeCAD Documentation
Revision as of 10:07, 15 April 2020 by David69 (talk | contribs) (Created page with "{{Docnav/fr |Enregistrer sous |Tout enregistrer |Menu fichier |IconL=Std_SaveAs.svg |IconR= |IconC=Freecad.svg }}")

Std Sauvegarder une copie

Emplacement du menu
Fichier → Sauvegarder une copie...
Ateliers
Tous
Raccourci par défaut
C
Introduit dans la version
-
Voir aussi
Std Enregistrer, Std Enregistrer sous...

Description

Enregistre une copie du document réel sous un nouveau nom de fichier.

The Std SaveCopy command saves a copy of the active document under a new file name.

Utilisation

Choisir Fichier → Sauvegarder une copie... à partir du menu supérieur.

Options

  • Press Esc or the Cancel button to abort the command.

Preferences

  • The last used file location is stored: Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath.

Scripting

See also: FreeCAD Scripting Basics.

To save a copy of a document use the saveCopy method of the document object.

import FreeCAD
from pathlib import Path

# The folder and filename we will use:
fld = 'D:/testfiles/'
fnm = fld + 'testCopy.FCStd'

# Make sure fld exists:
Path(fld).mkdir(parents=True, exist_ok=True)

doc = FreeCAD.newDocument()
doc.saveCopy(fnm)