Repository navigation
WBLOCK Command
github-actions[bot] edited this page Nov 27, 2026
·
3 revisions
Writes selected objects, a block definition or the whole drawing to a new drawing file.
| Command | -WBLOCK |
| Aliases | W |
| Ribbon | Insert tab › Block Definition panel (Create Block drop-down › Write Block) |
| Web app | In the web app the new drawing is downloaded by the browser. |
| Since | 0.1.4 |
- Optionally select objects first; they are taken into the dialog.
- Run
WBLOCK. The Write Block dialog opens. - Under Source, choose what to write.
- For Objects, set the base point and the objects.
- Under Destination, set the file name and path and the insert units.
- Click OK.
| Setting | What it does |
|---|---|
| Block | Writes a block definition of the drawing, chosen from the list. |
| Entire drawing | Writes the whole drawing. |
| Objects | Writes the objects you select. |
| Base point | Pick point picks the base point in the drawing, or type X, Y and Z. Objects only. |
| Select objects / quick select button | Picks the objects to write, or opens quick select. The dialog shows how many objects are selected. |
| Retain / Convert to block / Delete from drawing | What happens to the selected objects in the current drawing after they are written. |
| File name and path | Where the new drawing is saved. The ... button opens a file browser. It starts as new block in the drawing's folder, or in your documents folder for an unsaved drawing. A .dxf name writes a DXF file instead of a DWG. |
| Insert units | The units stored in the new drawing. |
-WBLOCK asks everything on the command line, which suits scripts:
-
Enter name of output file:(.dwgis added when you give no extension). If the file exists, you are asked whether to replace it. -
Enter name of existing block or [= (block=output file)/* (whole drawing)] <define new drawing>:Type a block name,=for the block with the same name as the file,*for the whole drawing, or press Enter to write objects. - For objects:
Specify insertion base point or [mOde]:, thenSelect objects:(skipped when objects were selected before). mOde (O) chooses Convert to block (C), Retain (R) or Delete (D).
When FILEDIA is 1, -WBLOCK asks for the output file in a save dialog and the rest on the command line.
-
WBLOCK <block name>writes that block andWBLOCK *writes the selected objects; both ask for the file in a save dialog. - The dialog refuses to write to the current drawing's own file.
- A failed write is reported on the command line.
- The command is not available inside the block editor.
BLOCK · -BLOCK · INSERT · XATTACH
Open CAD Studio is free software under the GPL-3.0 licence · Source code · Download · Web app · Discussions
Get started
- Installation
- Your First Drawing
- Tutorials
- The User Interface
- Ribbon Reference
- Workspaces and Toolbars
- Navigating the Drawing
Draw and edit
- Drawing Setup and Units
- Precision Drawing
- Isometric Drafting
- Drawing Objects
- Multilines
- Selecting Objects
- Modifying Objects
- Hatches and Fills
- Layers and Properties
Annotate
Organise and reuse
Present and share
3D
Tools
Reference