Many users need to hide or limit the visible area of an external DWG in AutoCAD. Yes — you can crop an xref, and AutoCAD provides several methods depending on whether you want the crop to affect the host drawing, the external file, or only a layout viewport. Below you’ll find clear explanations, step‑by‑step instructions, alternative approaches, common errors and fixes, and practical tips for best results.
Short answer
- To crop an xref in Model space use XCLIP (or right‑click → Clip Xref).
- To edit the xref content (change the geometry inside the referenced DWG) use REFEDIT or open the source file.
- To clip the xref only inside a paper‑space viewport, use VPCLIP.
- For raster/image or PDF underlays use IMAGECLIP or PDCLIP respectively.
Why crop an xref?
Cropping an xref helps to:
- Reduce visual clutter and focus on the relevant area.
- Improve plotting/printing clarity.
- Keep the host drawing tidy without changing the external file’s geometry (unless you edit the source).
- Avoid detaching or creating new files when you only need to hide a portion.
How cropping works in AutoCAD (explanation)
- XCLIP creates a clipping boundary applied to the xref instance in the host drawing. The xref geometry outside the boundary is hidden but not deleted. The xref file remains intact unless you edit/save it.
- REFEDIT opens the referenced drawing for in‑place editing; changes you make can modify the external file if you save them.
- VPCLIP only affects a particular paper‑space viewport — useful for layouts where the same xref appears differently in multiple viewports.
- Clipping is non‑destructive: you can remove or invert the clip later. The original geometry still exists in the xref file.
Step‑by‑step — Crop an xref with XCLIP (model space)
- In the host drawing, select the xref or type XCLIP and press Enter.
- If prompted, select the xref reference to clip.
- Choose an option: New to create a new clip, Delete to remove an existing clip, ClipInverted to invert the current clip.
- Choose Rectangular or Polygonal boundary. For rectangular, pick two corners; for polygonal, pick successive points and press Enter to close.
- The clip boundary is applied; geometry outside it is hidden.
- To toggle visibility of the clip boundary frame, use the system variable XCLIPFRAME (0 hides, 1 shows frame only when selected, 2 always shows).
Tip: You can also right‑click an xref in the drawing area and choose Clip Xref for a GUI workflow.
Step‑by‑step — Edit and crop inside the xref (permanent changes)
- Select the xref and type REFEDIT (or right‑click → Edit Xref In‑place).
- AutoCAD opens an editing session showing the xref contents. The rest of the drawing is locked.
- Use normal Editing tools (Trim, Extend, Erase, Wblock, etc.) to change geometry.
- When finished, click save changes to External reference (or use the REFEDIT ribbon/command options) to update the source DWG, or discard changes if you don’t want the source modified.
- Exit the REFEDIT session.
Warning: Saving edits will modify the source file and affect all other drawings using that xref.
Step‑by‑step — Crop an xref inside a layout viewport (VPCLIP)
- Switch to the Layout tab containing the viewport.
- Activate the viewport (double‑click inside it or use MSPACE) or select the viewport boundary.
- Type VPCLIP and press Enter.
- Select the viewport you want to clip.
- Choose Rectangular or Polygonal and create the clipping boundary.
- The xref and other model‑space contents are clipped only inside that viewport.
Note: VPCLIP only affects that viewport. The same xref can be clipped differently in other viewports or in model space.
Alternative methods
- Bind the xref (BIND) to convert it into native objects in the host drawing, then trim/erase geometry as usual. Use caution: binding makes the xref permanent and can alter layers/names.
- Wipeout: place a wipeout object over the xref to mask areas. This is a visual mask and can cause plotting/selection complications.
- Create an overlay block: draw a polygon on a topmost layer and use it as mask; may require careful layer and plot settings.
- Edit the source DWG externally (open source file and save a trimmed version) if you need the crop to be permanent or to apply to every host drawing that uses the xref.
- For PDFs or images, use PDCLIP or IMAGECLIP respectively — XCLIP won’t work on underlays.
Common errors and fixes
Problem: XCLIP doesn’t work / command not found.
Fix: Confirm the object is a DWG xref. For PDFs use PDCLIP, for images use IMAGECLIP. If XCLIP still fails, check that the xref is not nested in a way that prevents selection — try selecting the xref in the Xref Manager.Problem: Clip appears but geometry still shows outside boundary.
Fix: Check if multiple xref instances overlap. Ensure you clipped the correct xref instance. Also check XCLIPFRAME to confirm clip frame location.Problem: Cannot edit xref with REFEDIT / changes won’t save.
Fix: You may lack write permissions to the source file or the xref is read‑only. Make sure the source DWG is writable and that you choose to save changes when exiting REFEDIT.Problem: VPCLIP not possible / viewport won’t accept clip.
Fix: VPCLIP only works on paper‑space viewports. Ensure the viewport is unlocked and active. For non‑rectangular viewports, use polygonal VPCLIP.Problem: Clipped area still plots or prints.
Fix: Verify that the clip is applied to the correct reference and that no overlapping objects or wipeouts are interfering. Check plotting settings and that the clipped xref is not bound unexpectedly.
Tips and best practices
- Use polygonal clips for irregular shapes and rectangular for quick rectangular crops.
- Set XCLIPFRAME = 0 to hide the clip frame on screen for cleaner viewing, or =2 to always show it.
- Prefer REFEDIT when you need to change source geometry; prefer XCLIP when you only need to hide parts in the host drawing.
- Keep a backup of the source DWG before binding or making permanent edits.
- If multiple layouts need different views of the same xref, use VPCLIP for each viewport instead of editing the source.
- Use consistent naming and organization for xref layers to make finding and clipping easier.
- When collaborating, communicate if you save changes to a referenced file — edits can affect all team members.
FAQ
Can I crop a Nested Xref (an xref inside another xref)?
Yes. You can use XCLIP on the nested xref instance in the host drawing if you can select it. If selection is difficult, open the parent xref or the nested source DWG and apply the clip there or use REFEDIT on the parent to access and clip the nested reference.
Will XCLIP delete the geometry outside the clip?
No. XCLIP hides geometry outside the clip boundary; it does not delete it. To permanently remove geometry, edit the source using REFEDIT or open and modify the DWG file.
How do I remove a clip I applied with XCLIP?
Select the clipped xref, type XCLIP, choose Delete (or use the right‑click Clip Xref → Remove Clip). The original geometry will become fully visible again.
Why can’t I save REFEDIT changes to the xref file?
Common causes: the source DWG is read‑only, you don’t have proper file permissions, or the file is located on a network drive with restricted access. Ensure the file is writable and local permissions allow saving.
Does clipping an xref improve drawing performance?
Clipping itself doesn’t significantly improve performance, because the full xref geometry is still loaded. For performance gains, consider creating a separate, smaller xref containing only the needed geometry or use binding and purging unused objects.
Can I clip a PDF or image the same way as a DWG xref?
No. Use PDCLIP for PDF underlays and IMAGECLIP for raster images. DWG xrefs require XCLIP (or VPCLIP in viewports).
