265 lines
11 KiB
Groff
265 lines
11 KiB
Groff
.\" -*- mode: troff; coding: utf-8 -*-
|
|
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.45)
|
|
.\"
|
|
.\" Standard preamble:
|
|
.\" ========================================================================
|
|
.de Sp \" Vertical space (when we can't use .PP)
|
|
.if t .sp .5v
|
|
.if n .sp
|
|
..
|
|
.de Vb \" Begin verbatim text
|
|
.ft CW
|
|
.nf
|
|
.ne \\$1
|
|
..
|
|
.de Ve \" End verbatim text
|
|
.ft R
|
|
.fi
|
|
..
|
|
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
|
.ie n \{\
|
|
. ds C` ""
|
|
. ds C' ""
|
|
'br\}
|
|
.el\{\
|
|
. ds C`
|
|
. ds C'
|
|
'br\}
|
|
.\"
|
|
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
|
.ie \n(.g .ds Aq \(aq
|
|
.el .ds Aq '
|
|
.\"
|
|
.\" If the F register is >0, we'll generate index entries on stderr for
|
|
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
|
.\" output yourself in some meaningful fashion.
|
|
.\"
|
|
.\" Avoid warning from groff about undefined register 'F'.
|
|
.de IX
|
|
..
|
|
.nr rF 0
|
|
.if \n(.g .if rF .nr rF 1
|
|
.if (\n(rF:(\n(.g==0)) \{\
|
|
. if \nF \{\
|
|
. de IX
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
|
..
|
|
. if !\nF==2 \{\
|
|
. nr % 0
|
|
. nr F 2
|
|
. \}
|
|
. \}
|
|
.\}
|
|
.rr rF
|
|
.\" ========================================================================
|
|
.\"
|
|
.IX Title "DWGADD 5"
|
|
.TH DWGADD 5 2023-12-23 0.13.3 "User Commands"
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
|
.\" way too many mistakes in technical documents.
|
|
.if n .ad l
|
|
.nh
|
|
.SH NAME
|
|
dwgadd.5 \- Format of the LibreDWG dwgadd example input\-file
|
|
.SH DESCRIPTION
|
|
.IX Header "DESCRIPTION"
|
|
The dwgadd program accepts this input format to add entities and objects
|
|
to a DWG file.
|
|
.SH COMMANDS
|
|
.IX Header "COMMANDS"
|
|
commands start at each new line and must begin with a keyword and has optional arguments.
|
|
.PP
|
|
comments start with # and are ignored.
|
|
.PP
|
|
entities are created with the arguments as in the VBA object model AddEntity or AddObject methods.
|
|
.PP
|
|
entities are added to the model space by default, objects to the DWG or to parents objects, as e.g.
|
|
with \f(CW\*(C`xrecord dictionary\*(C'\fR.
|
|
.IP "\fBreaddwg\fR ""file.dwg""" 4
|
|
.IX Item "readdwg ""file.dwg"""
|
|
This must be the very first command. Otherwise a new, empty DWG Document is created.
|
|
.IP "\fBreaddxf\fR ""file.dxf""" 4
|
|
.IX Item "readdxf ""file.dxf"""
|
|
This must be the very first command. Otherwise a new, empty DWG Document is created.
|
|
.IP "\fBreadjson\fR ""file.json""" 4
|
|
.IX Item "readjson ""file.json"""
|
|
This must be the very first command. Otherwise a new, empty DWG Document is created.
|
|
.IP \fBimperial\fR 4
|
|
.IX Item "imperial"
|
|
By default a new DWG is created as metric.
|
|
There must be maximal one imperial line.
|
|
.IP "\fBversion\fR number" 4
|
|
.IX Item "version number"
|
|
Writes the output file in this version. It accepts numbers only \f(CW\*(C`[0\-9.]+\*(C'\fR,
|
|
prefixes it with an "r", and converts this string via \f(CWdwg_version_as("r"version)\fR
|
|
to a \f(CW\*(C`Dwg_Version_Type\*(C'\fR. It accepts only valid DWG versions.
|
|
There must be maximal one version line.
|
|
.IP \fBpspace\fR 4
|
|
.IX Item "pspace"
|
|
Add further entities to the paper space.
|
|
.IP \fBmspace\fR 4
|
|
.IX Item "mspace"
|
|
Add further entities to the model space again. This is only needed
|
|
when a previous \f(CW\*(C`pspace\*(C'\fR command was used. mspace is the default.
|
|
.IP "\fBHEADER\fR.\fIfield\fR = value" 4
|
|
.IX Item "HEADER.field = value"
|
|
Assign "VALUES" to a HEADER field. See the full documentation of valid HEADER fields.
|
|
.IP "\fBpoint\fR (3dpoint)" 4
|
|
.IX Item "point (3dpoint)"
|
|
.PD 0
|
|
.IP "\fBline\fR (3dpoint) (3dpoint)" 4
|
|
.IX Item "line (3dpoint) (3dpoint)"
|
|
.PD
|
|
Create a line variable and entity. You may set all other fields via the
|
|
\&\f(CW\*(C`line.field = value\*(C'\fR syntax. E.g. \f(CW\*(C`line.layer = "0"\*(C'\fR
|
|
.IP "\fBray\fR (3dpoint) (3dpoint)" 4
|
|
.IX Item "ray (3dpoint) (3dpoint)"
|
|
.PD 0
|
|
.IP "\fBxline\fR (3dpoint) (3dpoint)" 4
|
|
.IX Item "xline (3dpoint) (3dpoint)"
|
|
.IP "\fBtext\fR ""text_value"" (ins_pt) height" 4
|
|
.IX Item "text ""text_value"" (ins_pt) height"
|
|
.IP "\fBmtext\fR (ins_pt) height ""text_value""" 4
|
|
.IX Item "mtext (ins_pt) height ""text_value"""
|
|
.IP "\fBleader\fR num_points ((points)...) mtext type" 4
|
|
.IX Item "leader num_points ((points)...) mtext type"
|
|
.PD
|
|
mtext must be the immediate previous command.
|
|
.IP "\fBattribute\fR 8 0 ""prompt"" (0.0 1.0 0.0) ""tag"" ""text""" 4
|
|
.IX Item "attribute 8 0 ""prompt"" (0.0 1.0 0.0) ""tag"" ""text"""
|
|
.PD 0
|
|
.IP "\fBattdef\fR 8 0 ""prompt"" (0.0 1.0 0.0) ""tag"" ""default_text""" 4
|
|
.IX Item "attdef 8 0 ""prompt"" (0.0 1.0 0.0) ""tag"" ""default_text"""
|
|
.IP "\fBblock\fR ""name""" 4
|
|
.IX Item "block ""name"""
|
|
.PD
|
|
Starts a new block.
|
|
.IP \fBendblk\fR 4
|
|
.IX Item "endblk"
|
|
Ends the current block.
|
|
.IP "\fBinsert\fR (ins_pt) ""name"" xscale yscale zscale rotation" 4
|
|
.IX Item "insert (ins_pt) ""name"" xscale yscale zscale rotation"
|
|
.PD 0
|
|
.IP "\fBminsert\fR (ins_pt) ""name"" xscale yscale zscale rotation numrows numcols rowspacing colspacing" 4
|
|
.IX Item "minsert (ins_pt) ""name"" xscale yscale zscale rotation numrows numcols rowspacing colspacing"
|
|
.IP "\fBpolyline\fR_2d numpts ((2dpoints) ...)" 4
|
|
.IX Item "polyline_2d numpts ((2dpoints) ...)"
|
|
.IP "\fBlwpolyline\fR numpts ((2dpoints) ...)" 4
|
|
.IX Item "lwpolyline numpts ((2dpoints) ...)"
|
|
.IP "\fBpolyline\fR_3d numpts ((3dpoints) ...)" 4
|
|
.IX Item "polyline_3d numpts ((3dpoints) ...)"
|
|
.IP "\fBarc\fR (center) radius startangle endangle" 4
|
|
.IX Item "arc (center) radius startangle endangle"
|
|
.IP "\fBcircle\fR (center) radius" 4
|
|
.IX Item "circle (center) radius"
|
|
.IP "\fBpolyline\fR_pface 5 3 ((3dpoints)...) ((faces_4ints)...)" 4
|
|
.IX Item "polyline_pface 5 3 ((3dpoints)...) ((faces_4ints)...)"
|
|
.IP "\fBpolyline\fR_mesh num_m_verts num_n_verts ((3dpoints)...)" 4
|
|
.IX Item "polyline_mesh num_m_verts num_n_verts ((3dpoints)...)"
|
|
.IP "\fBdimension\fR_aligned (xline1_pt) (xline2_pt) (text_midpt)" 4
|
|
.IX Item "dimension_aligned (xline1_pt) (xline2_pt) (text_midpt)"
|
|
.IP "\fBdimension\fR_ang2ln (center_pt) (xline1end_pt) (xline2end_pt) (text_midpt)" 4
|
|
.IX Item "dimension_ang2ln (center_pt) (xline1end_pt) (xline2end_pt) (text_midpt)"
|
|
.IP "\fBdimension\fR_ang3pt (center_pt) (xline1_pt) (xline2_pt) (text_midpt)" 4
|
|
.IX Item "dimension_ang3pt (center_pt) (xline1_pt) (xline2_pt) (text_midpt)"
|
|
.IP "\fBdimension\fR_diameter (chord_pt) (far_chord_pt) leader_len" 4
|
|
.IX Item "dimension_diameter (chord_pt) (far_chord_pt) leader_len"
|
|
.IP "\fBdimension\fR_ordinate (feature_location_pt) (leader_endpt) number" 4
|
|
.IX Item "dimension_ordinate (feature_location_pt) (leader_endpt) number"
|
|
.IP "\fBdimension\fR_radius (center_pt) (chord_pt) leader_len" 4
|
|
.IX Item "dimension_radius (center_pt) (chord_pt) leader_len"
|
|
.IP "\fBdimension\fR_linear (xline1_pt) (xline2_pt) (def_pt) angle" 4
|
|
.IX Item "dimension_linear (xline1_pt) (xline2_pt) (def_pt) angle"
|
|
.IP "\fB3dface\fR (pt1) (pt2) (pt3) [(pt4)]" 4
|
|
.IX Item "3dface (pt1) (pt2) (pt3) [(pt4)]"
|
|
.IP "\fBsolid\fR (pt1) (pt2\-2d) (pt3\-2d) (pt4\-2d)" 4
|
|
.IX Item "solid (pt1) (pt2-2d) (pt3-2d) (pt4-2d)"
|
|
.IP "\fBtrace\fR (pt1) (pt2\-2d) (pt3\-2d) (pt4\-2d)" 4
|
|
.IX Item "trace (pt1) (pt2-2d) (pt3-2d) (pt4-2d)"
|
|
.IP "\fBshape\fR ""name"" (3dpoint) scale angle" 4
|
|
.IX Item "shape ""name"" (3dpoint) scale angle"
|
|
.IP "\fBviewport\fR ""name""" 4
|
|
.IX Item "viewport ""name"""
|
|
.IP "\fBellipse\fR (center_pt) major_axis axis_ratio" 4
|
|
.IX Item "ellipse (center_pt) major_axis axis_ratio"
|
|
.IP "\fBspline\fR num_fitpts ((fitpts)...) (begin_tan_vector) (end_tan_vector)" 4
|
|
.IX Item "spline num_fitpts ((fitpts)...) (begin_tan_vector) (end_tan_vector)"
|
|
.IP "\fBdictionary\fR ""name"" ""key"" handle_ref" 4
|
|
.IX Item "dictionary ""name"" ""key"" handle_ref"
|
|
.IP "\fBxrecord\fR dictionary ""name""" 4
|
|
.IX Item "xrecord dictionary ""name"""
|
|
.IP "\fBtolerance\fR ""testtekst"" (0 0 0) (0 0 1)" 4
|
|
.IX Item "tolerance ""testtekst"" (0 0 0) (0 0 1)"
|
|
.IP "\fBmlinestyle\fR ""name""" 4
|
|
.IX Item "mlinestyle ""name"""
|
|
.IP "\fBmline\fR num_points ((points)...)" 4
|
|
.IX Item "mline num_points ((points)...)"
|
|
.IP "\fBlayout\fR viewport ""name"" ""canonical_media_name""" 4
|
|
.IX Item "layout viewport ""name"" ""canonical_media_name"""
|
|
.IP "\fBtorus\fR (center_pt) (normal) major_radius minor_radius" 4
|
|
.IX Item "torus (center_pt) (normal) major_radius minor_radius"
|
|
.IP "\fBsphere\fR (center_pt) (normal) radius" 4
|
|
.IX Item "sphere (center_pt) (normal) radius"
|
|
.IP "\fBcylinder\fR (center_pt) (normal) height major_radius minor_radius x_radius" 4
|
|
.IX Item "cylinder (center_pt) (normal) height major_radius minor_radius x_radius"
|
|
.IP "\fBcone\fR (center_pt) (normal) height major_radius minor_radius x_radius" 4
|
|
.IX Item "cone (center_pt) (normal) height major_radius minor_radius x_radius"
|
|
.IP "\fBwedge\fR (center_pt) (normal) length width height" 4
|
|
.IX Item "wedge (center_pt) (normal) length width height"
|
|
.IP "\fBbox\fR (center_pt) (normal) length width height" 4
|
|
.IX Item "box (center_pt) (normal) length width height"
|
|
.IP "\fBpyramid\fR (center_pt) (normal) height sides radius topradius" 4
|
|
.IX Item "pyramid (center_pt) (normal) height sides radius topradius"
|
|
.IP "\fBlayer\fR ""name""" 4
|
|
.IX Item "layer ""name"""
|
|
.IP "\fBstyle\fR ""name""" 4
|
|
.IX Item "style ""name"""
|
|
.IP "\fBltype\fR ""name""" 4
|
|
.IX Item "ltype ""name"""
|
|
.IP "\fBvport\fR ""name""" 4
|
|
.IX Item "vport ""name"""
|
|
.IP "\fBview\fR ""name""" 4
|
|
.IX Item "view ""name"""
|
|
.IP "\fBvport\fR ""name""" 4
|
|
.IX Item "vport ""name"""
|
|
.IP "\fBlayout\fR ""name""" 4
|
|
.IX Item "layout ""name"""
|
|
.IP "\fBgroup\fR ""name""" 4
|
|
.IX Item "group ""name"""
|
|
.IP "\fIentity\fR.\fIfield\fR = value" 4
|
|
.IX Item "entity.field = value"
|
|
.PD
|
|
Every field of the just created entity or object can be set. See "VALUES"
|
|
and the full documentation of the available entity fields.
|
|
.SH VALUES
|
|
.IX Header "VALUES"
|
|
Acceptable values must be formatted as:
|
|
.IP \fBinteger\fR 4
|
|
.IX Item "integer"
|
|
negative integers are allowed.
|
|
\&\f(CW\*(C`0xXXX\*(C'\fR hex numbers are not accepted.
|
|
.IP \fBfloat\fR 4
|
|
.IX Item "float"
|
|
floats may omit the dot.
|
|
.IP "\fBangle\fR as float in degrees, not radians." 4
|
|
.IX Item "angle as float in degrees, not radians."
|
|
.PD 0
|
|
.IP "\fBstring\fR in double-quotes" 4
|
|
.IX Item "string in double-quotes"
|
|
.PD
|
|
E.g "string" or "" for the empty string.
|
|
.IP "\fBpoint\fR as (float, float, [float])" 4
|
|
.IX Item "point as (float, float, [float])"
|
|
esp. (float float) for 2dpoint
|
|
.Sp
|
|
(float float float) for 3dpoint. (0 0 0) is a valid 3dpoint.
|
|
.ie n .IP "\fBhandle\fR as ""D.D.XXX""" 4
|
|
.el .IP "\fBhandle\fR as \f(CWD.D.XXX\fR" 4
|
|
.IX Item "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.
|
|
.Sp
|
|
E.g. \f(CW5.1.15\fR for HEADER.LTYPE_BYLAYER.
|