DWGADD(5)
π DWGADD(5) β dwgadd.5 π
okay so hi bestie!! this is the dwgadd.5 manual page β the format of the LibreDWG dwgadd example input-file. we're gonna keep every detail, periodt. β¨
π NAME π
dwgadd.5 β Format of the LibreDWG dwgadd example input-file. That's the name, that's the vibe, no cap. π
πΈ DESCRIPTION πΈ
The dwgadd program accepts this input format to add entities and objects to a DWG file. literally its whole job. π«Ά
β¨ COMMANDS β¨
okay so commands are the main character here. commands start at each new line and must begin with a keyword and has optional arguments. (yes, "has" β we're keeping the original grammar vibe, bestie.)
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.
readdwg "file.dwg"β this must be the very first command. Otherwise a new, empty DWG Document is created. π±readdxf "file.dxf"β this must be the very first command. Otherwise a new, empty DWG Document is created. π±readjson "file.json"β this must be the very first command. Otherwise a new, empty DWG Document is created. π±imperialβ by default a new DWG is created as metric. There must be maximal oneimperialline. π¦version numberβ writes the output file in this version. It accepts numbers only"[0-9.]+", prefixes it with an"r", and converts this string viadwg_version_as("r"version)to a"Dwg_Version_Type". It accepts only valid DWG versions. There must be maximal oneversionline. π₯pspaceβ add further entities to the paper space. πmspaceβ add further entities to the model space again. This is only needed when a previouspspacecommand was used.mspaceis the default. π«HEADER.field = valueβ assign"VALUES"to a HEADER field. See the full documentation of valid HEADER fields. πpoint (3dpoint)line (3dpoint) (3dpoint)β create a line variable and entity. You may set all other fields via theline.field = valuesyntax. E.g.line.layer = "0". β¨ray (3dpoint) (3dpoint)xline (3dpoint) (3dpoint)text "text_value" (ins_pt) heightmtext (ins_pt) height "text_value"leader num_points ((points)...) mtext typeβmtextmust be the immediate previous command. π¨attribute 8 0 "prompt" (0.0 1.0 0.0) "tag" "text"attdef 8 0 "prompt" (0.0 1.0 0.0) "tag" "default_text"block "name"β starts a new block. π§±endblkβ ends the current block. πinsert (ins_pt) "name" xscale yscale zscale rotationminsert (ins_pt) "name" xscale yscale zscale rotation numrows numcols rowspacing colspacingpolyline_2d numpts ((2dpoints) ...)lwpolyline numpts ((2dpoints) ...)polyline_3d numpts ((3dpoints) ...)arc (center) radius startangle endanglecircle (center) radiuspolyline_pface 5 3 ((3dpoints)...) ((faces_4ints)...)polyline_mesh num_m_verts num_n_verts ((3dpoints)...)dimension_aligned (xline1_pt) (xline2_pt) (text_midpt)dimension_ang2ln (center_pt) (xline1end_pt) (xline2end_pt) (text_midpt)dimension_ang3pt (center_pt) (xline1_pt) (xline2_pt) (text_midpt)dimension_diameter (chord_pt) (far_chord_pt) leader_lendimension_ordinate (feature_location_pt) (leader_endpt) numberdimension_radius (center_pt) (chord_pt) leader_lendimension_linear (xline1_pt) (xline2_pt) (def_pt) angle3dface (pt1) (pt2) (pt3) [(pt4)]solid (pt1) (pt2-2d) (pt3-2d) (pt4-2d)trace (pt1) (pt2-2d) (pt3-2d) (pt4-2d)shape "name" (3dpoint) scale angleviewport "name"ellipse (center_pt) major_axis axis_ratiospline num_fitpts ((fitpts)...) (begin_tan_vector) (end_tan_vector)dictionary "name" "key" handle_refxrecord dictionary "name"tolerance "testtekst" (0 0 0) (0 0 1)mlinestyle "name"mline num_points ((points)...)layout viewport "name" "canonical_media_name"torus (center_pt) (normal) major_radius minor_radiussphere (center_pt) (normal) radiuscylinder (center_pt) (normal) height major_radius minor_radius x_radiuscone (center_pt) (normal) height major_radius minor_radius x_radiuswedge (center_pt) (normal) length width heightbox (center_pt) (normal) length width heightpyramid (center_pt) (normal) height sides radius topradiuslayer "name"style "name"ltype "name"vport "name"view "name"vport "name"layout "name"group "name"entity.field = valueβ 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:
integerβ negative integers are allowed."0xXXX"hex numbers are not accepted. π ββοΈfloatβ floats may omit the dot.- angle β as float in degrees, not radians. π
- string in double-quotes β E.g
"string"or""for the empty string. π - point as
(float, float, [float])β esp.(float float)for 2dpoint,(float float float)for 3dpoint.(0 0 0)is a valid 3dpoint. π - handle as
"D.D.XXX"β<C[0-12]>as type"."decimal digits as size"."hexadecimal absolute ref. For relative handle codes, like6,8,10,12do not take the 3rd handle part asis, but use the absolute ref. E.g.5.1.15forHEADER.LTYPE_BYLAYER. π
footer sign-off, bestie: source/version 0.14 β¨ date 2025-03-25 β¨ and the manual is DWGADD(5). go off, queen π
π¦ where this page comes from
- nixpkgs unstable: libredwg 0.14
- opensuse-leap 16.0: libredwg-tools 0.14.8413-bp160.1.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: libredwg-tools 0.14.8413-bp160.1.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: libredwg-tools 0.14.8413-bp160.1.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: libredwg-tools 0.14.8413-bp160.1.1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms