Std SaveCopy/fr: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 19: Line 19:
}}
}}


<div class="mw-translate-fuzzy">
==Description==
==Description==
Enregistre une copie du document réel sous un nouveau nom de fichier.
</div>


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

Revision as of 10:08, 15 April 2020

Std Enregistrer une copie

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

Description

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)