Std SaveCopy: Difference between revisions

From FreeCAD Documentation
(Undo revision 797413 by David69 (talk))
Tag: Undo
(Added icons from src.)
Line 7: Line 7:
|[[Std_File_Menu|Std File Menu]]
|[[Std_File_Menu|Std File Menu]]
|IconL=Std_SaveAs.svg
|IconL=Std_SaveAs.svg
|IconR=
|IconR=Std_SaveAll.svg
|IconC=Freecad.svg
|IconC=Freecad.svg
}}
}}
Line 15: Line 15:
{{GuiCommand
{{GuiCommand
|Name=Std SaveCopy
|Name=Std SaveCopy
|Empty=1
|MenuLocation=File → Save a Copy...
|MenuLocation=File → Save a Copy...
|Workbenches=All
|Workbenches=All
Line 29: Line 28:


<!--T:6-->
<!--T:6-->
# Select the {{MenuCommand|File → Save a Copy...}} option from the menu.
# Select the {{MenuCommand|File → [[Image:Std_SaveCopy.svg|16px]] Save a Copy...}} option from the menu.
# Enter a filename in the dialog box.
# Enter a filename in the dialog box.
# Press the {{Button|Save}} button.
# Press the {{Button|Save}} button.
Line 67: Line 66:
}}
}}
<translate>
<translate>



<!--T:17-->
<!--T:17-->
Line 74: Line 74:
|[[Std_File_Menu|Std File Menu]]
|[[Std_File_Menu|Std File Menu]]
|IconL=Std_SaveAs.svg
|IconL=Std_SaveAs.svg
|IconR=
|IconR=Std_SaveAll.svg
|IconC=Freecad.svg
|IconC=Freecad.svg
}}
}}

Revision as of 10:29, 7 December 2020

Std SaveCopy

Menu location
File → Save a Copy...
Workbenches
All
Default shortcut
None
Introduced in version
-
See also
Std SaveAs, Std Save

Description

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

Usage

  1. Select the File → Save a Copy... option from the menu.
  2. Enter a filename in the dialog box.
  3. Press the Save button.

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)