Std SaveCopy/en: Difference between revisions

From FreeCAD Documentation
(Importing a new version from external source)
(Updating to match new version of source page)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Std SaveaCopy|MenuLocation=[[Std_File_Menu|File]] → Save a Copy...|Workbenches=All|Shortcut=C|SeeAlso=[[Std_Save|Save]], [[Std_SaveAs|Save as...]] }}

{{Docnav
|[[Std_SaveAs|SaveAs]]
|[[Std_SaveAll|SaveAll]]
|[[Std_File_Menu|Std File Menu]]
|IconL=Std_SaveAs.svg
|IconR=Std_SaveAll.svg
|IconC=Freecad.svg
}}

{{GuiCommand
|Name=Std SaveCopy
|MenuLocation=File → Save a Copy...
|Workbenches=All
|SeeAlso=[[Std_SaveAs|Std SaveAs]], [[Std_Save|Std Save]]
}}


==Description==
==Description==
Saves a copy of the actual document under a new file name.


The '''Std SaveCopy''' command saves a copy of the active document under a new file name.
==Use==
Choose {{KEY| File}} {{KEY| Save a Copy...}} from the top menu.


==Limitations==
==Usage==
<br />


# Select the {{MenuCommand|File → [[Image:Std_SaveCopy.svg|16px]] Save a Copy...}} option from the menu.
==Notes==
# Enter a filename in the dialog box.
<br />
# Press the {{Button|Save}} button.


==Options==


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


==Scripting==
{{clear}}

<languages/>
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

To save a copy of a document use the {{incode|saveCopy}} method of the document object.

{{Code|code=
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)
}}


{{Docnav
|[[Std_SaveAs|SaveAs]]
|[[Std_SaveAll|SaveAll]]
|[[Std_File_Menu|Std File Menu]]
|IconL=Std_SaveAs.svg
|IconR=Std_SaveAll.svg
|IconC=Freecad.svg
}}

{{Std_Base_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

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)