AutoCAD WBLOCK (Write Block) is a powerful command for extracting objects or block definitions from a drawing into a separate .dwg file. This guide explains what WBLOCK does, how to use it step-by-step (both GUI and command-line), practical examples, alternatives, common problems and fixes, best practices, and an FAQ to answer follow-up questions.
What is the WBLOCK shortcut?
WBLOCK (Write Block) is an AutoCAD command that writes objects or a block definition to a new drawing file.
- The default full command is WBLOCK; the default alias (shortcut) is W.
- The command can export: a named block, a selected set of objects, or the entire drawing into a new .dwg file.
- Use -WBLOCK (with the leading hyphen) to run the command entirely from the command line (useful for scripts or batch processes).
How to use WBLOCK (Step by step)
Using the WBLOCK dialog (graphical)
- Type W or WBLOCK and press Enter.
- In the Write Block dialog, choose the Source:
- Block — select a named block from the dropdown.
- Objects — choose specific objects from the drawing.
- Entire Drawing — write the whole drawing to a new file.
- If you choose Objects, click Select objects and pick the objects in the drawing. You will be prompted to specify a base point (this becomes the insertion base point for the new DWG).
- Enter a file name and location for the new .dwg. Click OK (or Save). The selected objects/block are written to the new drawing file.
Using the command-line version (-WBLOCK)
- Type -WBLOCK and press Enter.
- Choose one of the options typed at the prompt: Block, Objects, or Entire.
- For Objects, you’ll be asked to specify a base point and then select objects (or provide a selection window).
- Enter the full file path and name (you can include a path) and press Enter.
Notes:
- Use -WBLOCK to automate in scripts or when running on systems where you prefer prompts rather than the dialog box.
- If you need a deterministic base point for alignment, enter coordinates (e.g., 0,0) when prompted.
Practical examples (before and after)
Example 1 — Extract a symbol for reuse:
- Before: A floor plan contains a custom furniture symbol used in several sheets.
- Action: Type W, choose Objects, pick the symbol, set base point to symbol insertion point, save as FurnitureSymbol.dwg.
- After: FurnitureSymbol.dwg contains only that symbol and can be inserted or shared as a block library file.
Example 2 — Export a named block to a file:
- Before: Multiple custom window blocks exist in the drawing.
- Action: Type W, choose Block, pick the block name “Window_A”, set base point, save as Window_A.dwg.
- After: Window_A.dwg is a standalone block file you can give to other users.
Alternative methods to WBLOCK
- Create a new drawing + COPYBASE + PASTECLIP / PASTEORIG: Copy with a base point (COPYBASE), open a new drawing, use PASTECLIP or PASTEORIG, then SAVEAS. Good for manual workflows.
- BLOCK command + WBLOCK: Create or redefine a block in the current drawing, then use WBLOCK to write that block to a DWG.
- DesignCenter (ADCENTER): Drag-and-drop blocks and content between open drawings or from folders. Useful for building block libraries.
- -WBLOCK (for automation): Use in scripts, LISP routines, or batch files to export blocks/objects without dialogs.
- eTransmit or DXB/DXF export: For packaging drawings with XREFs or exporting to exchange formats (not a direct replacement but useful for distribution).
- DWG Convert / Save As: After creating a WBLOCK file, use SAVEAS or the DWG Convert utility to change DWG versions or batch-convert files.
Why WBLOCK might not work — common problems and fixes
-
Selected objects are part of an XREF
- Problem: XREF entities are references and aren’t extracted as native geometry.
- Fix: Bind or Insert the XREF (use the XREF palette > Bind or use INSERT to create local geometry) before using WBLOCK, or open the referenced drawing and WBLOCK from there.
-
File path or permissions issues
- Problem: You can’t save to a folder that is read-only or where you lack write permissions.
- Fix: Choose a different folder (e.g., Desktop), request appropriate permissions, or save locally and move the file later.
-
Command alias or shortcut changed
- Problem: Typing W does nothing because the alias was modified in CUI or by a customization.
- Fix: Type the full WBLOCK or -WBLOCK. Check the CUI editor to restore/confirm alias mapping.
-
Selection not being accepted
- Problem: Pre-selection won’t work if PICKFIRST is set to 0.
- Fix: Set PICKFIRST to 1 (type PICKFIRST and set to 1) or select objects after starting the command.
-
File already open or read-only
- Problem: Trying to write a file that is open in another instance or marked read-only.
- Fix: Close the target DWG elsewhere, choose a new filename, or remove read-only attribute.
-
You need a specific DWG version
- Problem: WBLOCK writes in the current drawing format; recipients need an older DWG version.
- Fix: After creating the WBLOCK file, open it and use SAVEAS or DWG Convert to save to the required older DWG format.
-
Proxy or custom objects appear wrong
- Problem: Third-party objects or proxies may not display or behave correctly in other setups.
- Fix: Ensure recipients have the proper object enablers or explode/convert proxy objects if possible before WBLOCK.
-
Layout/paper space content not included
- Problem: WBLOCK typically writes selected model-space objects or a block definition; it doesn’t export layout tabs or sheet-specific viewport content automatically.
- Fix: Copy layout content into model space first, or create a block of the layout content and then WBLOCK that block.
Tips and best practices
- Always set a meaningful base point when using Objects or Block options — this ensures correct placement when inserting the new DWG as a block.
- Use -WBLOCK for scripting and batch exports (easier to automate).
- Consider purging unused definitions (PU) and running AUDIT or RECOVER on source drawings to keep exported DWGs clean.
- To build a block library, store WBLOCK outputs in a structured folder and use meaningful file names and metadata.
- If you need recipients to be able to edit everything without XREFs, bind external references before writing.
- To preserve exact coordinates, use the global base point (0,0) if appropriate.
- Test the exported DWG by opening it on a separate machine or a fresh AutoCAD session to ensure all expected entities and layers appear correctly.
FAQ
What is the difference between WBLOCK and -WBLOCK?
WBLOCK opens a graphical dialog to guide you through selecting objects or blocks and saving the file. -WBLOCK runs the same functionality purely through command-line prompts, which is better for automation, scripts, and batch files.
Can WBLOCK include XREF geometry?
No — XREFs are references. To include their geometry you must bind or insert the XREF into the host drawing (which converts referenced entities to local entities), then run WBLOCK.
Can WBLOCK export layout (paper space) content?
WBLOCK generally exports selected entities or block definitions; layout tabs and viewport-specific content are not exported automatically. To export layout content, copy those entities to model space or create a block of the layout content and then WBLOCK the block.
How do I produce a WBLOCK file in an older DWG version?
WBLOCK saves in the current drawing format. After creating the WBLOCK file, open it and use SAVEAS or DWG Convert to save to the desired older DWG version.
Why can’t I type W to run WBLOCK?
The alias W may have been changed or removed in the CUI (customization) or overridden by a third-party tool. Type WBLOCK (full command) or check the CUI to restore the alias.
Will WBLOCK preserve layer properties, linetypes and text styles?
Yes — WBLOCK writes the selected entities and the associated definitions (layers, linetypes, text styles used by those objects). If your drawing uses custom linetypes or fonts not available on the recipient’s system, the visualization may differ until those assets are installed.
How can I automate exporting multiple blocks to separate files?
Use -WBLOCK in a script or LISP routine to loop through block names and write each block to a separate file. Alternatively, use third-party utilities or write a simple AutoLISP routine to iterate and call -WBLOCK for each block.
What happens to anonymous or dynamic block parts when using WBLOCK?
Named block definitions are written as-is. Anonymous blocks that are part of a block definition will be included as necessary. For complex dynamic blocks, test the resulting DWG to confirm behaviors — some dynamic parameters are maintained, but linked resources or custom behaviors may need verification.
