GstarCAD 2027 · Command Reference
Commands > X Command > XREF > XREF Command Line
The XATTACH command is used to attach a DWG file as an external reference.
Command Prompts:
Enter an option[?/Bind/Detach/Path/Unload/Reload/Overlay/Attach]\<Attach> \<Attach>:
Specify insertion point or [Scale/X/Y/Z/Rotate/Pscale/PX/PY/PZ/PRotate]:
Relative Glossary:
?:
List the name, path and type of DWG reference, as well number of DWG references which attached in current drawing.
Bind:
Change specified DWG reference to be a block and make it become a permanet part of drawing.
Detach:
Detach one or more DWG references from drawing, deleting all instances of a specified xref and removing the xref definition from the definition table. Only the xrefs attached or overlaid directly to the current drawing can be detached; nested xrefs cannot be detached.
Path:
Display and edits the path name associated with a particular DWG reference.
Unload:
Unload selected DWG reference.
It may leave a mark at the position where the xref located for reloading.
Reload:
Reload one or more DWG references. This option reloads and displays the most recently saved version of that drawing.
Overlay:
Display the Enter Name of File to Overlay Dialog Box . Select the file you want to attach to a drawing as an external reference (xref) overlay. If you reference a drawing that contains an overlaid xref, the overlaid xref does not appear in the current drawing.
If the xref you specify is not already overlaid, a new xref is created, using the name of the referenced file. You are then prompted for an insertion point, scale, and rotation angle, as described for the INSERT Command.
Inputting "\~" to display the dialog box.
Attach:
Open the Dialog Box corresponding to the selected reference type.
Specify insertion point:
Specfiy the insertion point or options.
Scale:
Set the scale. In the xref, all X and Y dimension will multiple by X and Y scale factor. The inserted xref will rotate around the rotation center by rotation angle.
X,Y and Z:
Set the X,Y and Z factors.X factor:
Define X,Y and Z scale factors.
Corner point:
Using a rectangle to define X and Y scales, and define the rectangle by specifying two corner points, and then define Z scale.Rotate:
Insert a rotate angle for the xref.
Pscale:
Set scale factors for X, Y and Z scale factors to control the xref display when dragging in place.
PX, PY, PZ
Set the X, Y and Z axes to control the xref display when dragging in place.
PRotate:
Set the rotation angle when dragging the xref in place.
Article ID: 2927
Created: September 26, 2026
Last Updated: September 25, 2026
Author: kbadmin
Online URL: https://kb.gstarcad.com.my/article/xref-command-line-gstarcad-2027-2927.html