DWGADD(5)

πŸ“¦
version 0.14.8413 Β· 2 versions
, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– 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 one imperial line. πŸ¦‹
  • version number β€” 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. πŸ”₯
  • pspace β€” add further entities to the paper space. πŸŽ€
  • mspace β€” add further entities to the model space again. This is only needed when a previous pspace command was used. mspace is 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 the line.field = value syntax. E.g. line.layer = "0". ✨
  • ray (3dpoint) (3dpoint)
  • xline (3dpoint) (3dpoint)
  • text "text_value" (ins_pt) height
  • mtext (ins_pt) height "text_value"
  • leader num_points ((points)...) mtext type β€” mtext must 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 rotation
  • minsert (ins_pt) "name" xscale yscale zscale rotation numrows numcols rowspacing colspacing
  • polyline_2d numpts ((2dpoints) ...)
  • lwpolyline numpts ((2dpoints) ...)
  • polyline_3d numpts ((3dpoints) ...)
  • arc (center) radius startangle endangle
  • circle (center) radius
  • polyline_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_len
  • dimension_ordinate (feature_location_pt) (leader_endpt) number
  • dimension_radius (center_pt) (chord_pt) leader_len
  • dimension_linear (xline1_pt) (xline2_pt) (def_pt) angle
  • 3dface (pt1) (pt2) (pt3) [(pt4)]
  • solid (pt1) (pt2-2d) (pt3-2d) (pt4-2d)
  • trace (pt1) (pt2-2d) (pt3-2d) (pt4-2d)
  • shape "name" (3dpoint) scale angle
  • viewport "name"
  • ellipse (center_pt) major_axis axis_ratio
  • spline num_fitpts ((fitpts)...) (begin_tan_vector) (end_tan_vector)
  • dictionary "name" "key" handle_ref
  • xrecord 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_radius
  • sphere (center_pt) (normal) radius
  • cylinder (center_pt) (normal) height major_radius minor_radius x_radius
  • cone (center_pt) (normal) height major_radius minor_radius x_radius
  • wedge (center_pt) (normal) length width height
  • box (center_pt) (normal) length width height
  • pyramid (center_pt) (normal) height sides radius topradius
  • layer "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, 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. πŸ”‘

footer sign-off, bestie: source/version 0.14 ✨ date 2025-03-25 ✨ and the manual is DWGADD(5). go off, queen πŸ’œ