Std Enregistrer une copie

From FreeCAD Documentation
Revision as of 21:36, 23 March 2020 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

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)