Std SaveCopy/en: Difference between revisions

From FreeCAD Documentation
m (FuzzyBot moved page Std SaveaCopy/en to Std SaveCopy/en without leaving a redirect: Part of translatable page "Std SaveaCopy")
(Updating to match new version of source page)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
{{Docnav
|[[Std_SaveAs|Std SaveAs]]
|[[Std_SaveAs|SaveAs]]
|[[Std_SaveAll|Std SaveAll]]
|[[Std_SaveAll|SaveAll]]
|[[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
}}
}}


<!--Empty=1 to suppress icon-->
{{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 24: Line 23:
==Usage==
==Usage==


# 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 31: Line 30:


* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command.
* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command.

==Preferences==

* The last used file location is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath}}.


==Scripting==
==Scripting==
Line 56: Line 51:
doc.saveCopy(fnm)
doc.saveCopy(fnm)
}}
}}



{{Docnav
{{Docnav
|[[Std_SaveAs|Std SaveAs]]
|[[Std_SaveAs|SaveAs]]
|[[Std_SaveAll|Std SaveAll]]
|[[Std_SaveAll|SaveAll]]
|[[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
}}
}}


{{Std Base navi{{#translation:}}}}
{{Std_Base_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 11:52, 21 April 2024

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.

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)