# REFCLOSE Command
[GstarCAD 2022](Help%20System/GSTARCAD/2022/Index.md) → [Commands](Help%20System/GSTARCAD/2022/Commands/(Commands).md) → [R](Help%20System/GSTARCAD/2022/Commands/R/(R).md)
## Function Description:
This command is used to save or discard changes made by a reference, either an
xref or a block definition in-place editor.
Users can use the UNDO command to return to edit the changes that saved or discarded by the REFCLOSE command.
If users have changed an external reference and already saved it by
accident, they can use UNDO command to quit those changes and use REFCLOSE command to save it. The REFCLOSE
command can also restore the xref to its original state.
## Command Access:
> **Icon:**
> 
> 
> **Menu:** Tools \> Xref and Block In-place Editing \> Close Reference/Save
> Reference Edits
> **Ribbon:** Edit Reference \> Edit Reference \> Save
> Changes/Discard Changes
> **Toolbar:** Refedit \> Close Reference/Save Reference Edits
> **Command:** REFCLOSE
> **Alias:** /
## Command Prompts:
Enter option \[Save/Discard
reference changes\] \<Save\>:
## **Save**
Saves all changes in the working set to the external reference or the
block definition in the current drawing. If you remove an object from the working set and save changes, the object
is deleted from the external reference and added to the current drawing.
Clicking the Save Reference Edits button on the Refedit toolbar to save reference editing
changes.
## **Discard reference changes**
This option is used to quit the working set, the original drawing or block definition
is returned to its original state. Any changes you make to objects in the current drawing rather than in
the external reference or block are not discarded. If you delete any object out of
the working set, the object is not restored. The Close Reference option in the Refedit toolbar
can automatically discard reference editing changes without the REFCLOSE command.