Scroll to navigation

DWGADD(5) User Commands DWGADD(5)

NAME

dwgadd.5 - Format of the LibreDWG dwgadd example input-file

DESCRIPTION

The dwgadd program accepts this input format to add entities and objects to a DWG file.

COMMANDS

commands start at each new line and must begin with a keyword and has optional arguments.

comments start with # and are ignored.

entities are created with the arguments as in the VBA object model AddEntity or AddObject methods.

entities are added to the model space by default, objects to the DWG or to parents objects, as e.g. with "xrecord dictionary".

This must be the very first command. Otherwise a new, empty DWG Document is created.
This must be the very first command. Otherwise a new, empty DWG Document is created.
This must be the very first command. Otherwise a new, empty DWG Document is created.
By default a new DWG is created as metric. There must be maximal one imperial line.
Writes the output file in this version. It accepts numbers only "[0-9.]+", prefixes it with an "r", and converts this string via dwg_version_as("r"version) to a "Dwg_Version_Type". It accepts only valid DWG versions. There must be maximal one version line.
Add further entities to the paper space.
Add further entities to the model space again. This is only needed when a previous "pspace" command was used. mspace is the default.
Assign "VALUES" to a HEADER field. See the full documentation of valid HEADER fields.
Create a line variable and entity. You may set all other fields via the "line.field = value" syntax. E.g. "line.layer = "0""
mtext must be the immediate previous command.
Starts a new block.
Ends the current block.
3dface (pt1) (pt2) (pt3) [(pt4)]
Every field of the just created entity or object can be set. See "VALUES" and the full documentation of the available entity fields.

VALUES

Acceptable values must be formatted as:

negative integers are allowed. "0xXXX" hex numbers are not accepted.
floats may omit the dot.
E.g "string" or "" for the empty string.
esp. (float float) for 2dpoint

(float float float) for 3dpoint. (0 0 0) is a valid 3dpoint.

<C[0-12]> as type "." decimal digits as size "." hexadecimal absolute ref. For relative handle codes, like 6,8,10,12 do not take the 3rd handle part asis, but use the absolute ref.

E.g. 5.1.15 for HEADER.LTYPE_BYLAYER.

2023-12-23 0.13.3