• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DomCR / ACadSharp / 11952991047

21 Nov 2024 12:14PM UTC coverage: 75.703% (+0.04%) from 75.668%
11952991047

Pull #490

github

web-flow
Merge 5faf262f1 into d11de9fcb
Pull Request #490: Issue 474 header defaults

4946 of 7225 branches covered (68.46%)

Branch coverage included in aggregate %.

28 of 41 new or added lines in 1 file covered. (68.29%)

11 existing lines in 1 file now uncovered.

19802 of 25466 relevant lines covered (77.76%)

36027.98 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.37
/src/ACadSharp/Header/CadHeader.cs
1
using ACadSharp.Attributes;
2
using ACadSharp.Entities;
3
using ACadSharp.Objects;
4
using ACadSharp.Tables;
5
using ACadSharp.Types.Units;
6
using CSMath;
7
using CSUtilities.Extensions;
8
using System;
9
using System.Collections.Generic;
10
using System.Linq;
11
using System.Reflection;
12

13
namespace ACadSharp.Header
14
{
15
        public class CadHeader
16
        {
17
                /// <summary>
18
                /// The Drawing database version number.
19
                /// </summary>
20
                /// <remarks>
21
                /// System variable ACADVER.
22
                /// </remarks>
23
                [CadSystemVariable("$ACADVER", DxfCode.Text)]
24
                public string VersionString
25
                {
26
                        get { return this.Version.ToString(); }
342✔
27
                        set
28
                        {
166✔
29
                                this.Version = CadUtils.GetVersionFromName(value);
166✔
30
                        }
166✔
31
                }
32

33
                public ACadVersion Version { get; set; } = ACadVersion.AC1018;
20,140✔
34

35
                /// <summary>
36
                /// Maintenance version number(should be ignored)
37
                /// </summary>
38
                /// <remarks>
39
                /// System variable ACADMAINTVER.
40
                /// </remarks>
41
                [CadSystemVariable(DxfReferenceType.Ignored, "$ACADMAINTVER", 70)]
42
                public short MaintenanceVersion { get; internal set; } = 0;
1,253✔
43

44
                /// <summary>
45
                /// Drawing code page.
46
                /// </summary>
47
                /// <remarks>
48
                /// System variable DWGCODEPAGE
49
                /// </remarks>
50
                [CadSystemVariable("$DWGCODEPAGE", 3)]
51
                public string CodePage { get; set; } = "ANSI_1252";
925✔
52

53
                /// <summary>
54
                /// Displays the name of the last person who modified the file
55
                /// </summary>
56
                /// <remarks>
57
                /// System variable LASTSAVEDBY
58
                /// </remarks>
59
                [CadSystemVariable(DxfReferenceType.Ignored, "$LASTSAVEDBY", 3)]
60
                public string LastSavedBy { get; set; } = "ACadSharp";
590✔
61

62
                /// <summary>
63
                /// The default value is 0.
64
                /// Read only.
65
                /// </summary>
66
                /// <remarks>
67
                /// System variable REQUIREDVERSIONS <br/>
68
                /// Only in <see cref="ACadVersion.AC1024"/> or above
69
                /// </remarks>
70
                [CadSystemVariable(DxfReferenceType.Ignored, "$REQUIREDVERSIONS", 70)]
71
                public long RequiredVersions { get; set; }
81✔
72

73
                /// <summary>
74
                /// </summary>
75
                /// <remarks>
76
                /// System variable DIMASO <br/>
77
                /// Obsolete; see DIMASSOC
78
                /// </remarks>
79
                [CadSystemVariable("$DIMASO", 70)]
80
                public bool AssociatedDimensions { get; set; } = true;
785✔
81

82
                /// <summary>
83
                /// System variable DIMSHO
84
                /// </summary>
85
                [CadSystemVariable("$DIMSHO", 70)]
86
                public bool UpdateDimensionsWhileDragging { get; set; } = true;
785✔
87

88
                /// <summary>
89
                /// Undocumented
90
                /// </summary>
91
                /// <remarks>
92
                /// System variable DIMSAV
93
                /// </remarks>
94
                internal bool DIMSAV { get; set; }
23✔
95

96
                /// <summary>
97
                /// Sets drawing units
98
                /// </summary>
99
                /// <remarks>
100
                /// System variable MEASUREMENT
101
                /// </remarks>
102
                [CadSystemVariable("$MEASUREMENT", 70)]
103
                public MeasurementUnits MeasurementUnits { get; set; }
132✔
104

105
                /// <summary>
106
                /// Governs the generation of linetype patterns around the vertices of a 2D polyline:<br/>
107
                /// 1 = Linetype is generated in a continuous pattern around vertices of the polyline<br/>
108
                /// 0 = Each segment of the polyline starts and ends with a dash
109
                /// </summary>
110
                /// <remarks>
111
                /// System variable PLINEGEN
112
                /// </remarks>
113
                [CadSystemVariable("$PLINEGEN", 70)]
114
                public bool PolylineLineTypeGeneration { get; set; } = false;
887✔
115

116
                /// <summary>
117
                /// System variable ORTHOMODE.
118
                /// Ortho mode on if nonzero.
119
                /// </summary>
120
                [CadSystemVariable("$ORTHOMODE", 70)]
121
                public bool OrthoMode { get; set; }
305✔
122

123
                /// <summary>
124
                /// System variable REGENMODE.
125
                /// REGENAUTO mode on if nonzero
126
                /// </summary>
127
                [CadSystemVariable("$REGENMODE", 70)]
128
                public bool RegenerationMode { get; set; }
305✔
129

130
                /// <summary>
131
                /// Fill mode on if nonzero
132
                /// </summary>
133
                /// <remarks>
134
                /// System variable FILLMODE.
135
                /// </remarks>
136
                [CadSystemVariable("$FILLMODE", 70)]
137
                public bool FillMode { get; set; } = true;
785✔
138

139
                /// <summary>
140
                /// Quick Text mode on if nonzero
141
                /// </summary>
142
                /// <remarks>
143
                /// System variable QTEXTMODE.
144
                /// </remarks>
145
                [CadSystemVariable("$QTEXTMODE", 70)]
146
                public bool QuickTextMode { get; set; }
305✔
147

148
                /// <summary>
149
                /// Controls paper space linetype scaling.
150
                /// </summary>
151
                /// <remarks>
152
                /// System variable PSLTSCALE.
153
                /// </remarks>
154
                [CadSystemVariable("$PSLTSCALE", 70)]
155
                public SpaceLineTypeScaling PaperSpaceLineTypeScaling { get; set; } = SpaceLineTypeScaling.Normal;
887✔
156

157
                /// <summary>
158
                /// Nonzero if limits checking is on
159
                /// System variable LIMCHECK.
160
                /// </summary>
161
                [CadSystemVariable("$LIMCHECK", 70)]
162
                public bool LimitCheckingOn { get; set; }
305✔
163

164
                /// <summary>
165
                /// System variable BLIPMODE        ??
166
                /// </summary>
167
                [CadSystemVariable("$BLIPMODE", 70)]
168
                public bool BlipMode { get; set; }
45✔
169

170
                /// <summary>
171
                /// Controls the user timer for the drawing
172
                /// System variable USRTIMER
173
                /// </summary>
174
                [CadSystemVariable("$USRTIMER", 70)]
175
                public bool UserTimer { get; set; }
305✔
176

177
                /// <summary>
178
                /// Determines the object type created by the SKETCH command
179
                /// System variable SKPOLY
180
                /// </summary>
181
                [CadSystemVariable("$SKPOLY", 70)]
182
                public bool SketchPolylines { get; set; }
305✔
183

184
                /// <summary>
185
                /// Represents angular direction.
186
                /// System variable ANGDIR
187
                /// </summary>
188
                [CadSystemVariable("$ANGDIR", 70)]
189
                public AngularDirection AngularDirection { get; set; } = AngularDirection.ClockWise;
887✔
190

191
                /// <summary>
192
                /// Controls the display of helixes and smoothed mesh objects.
193
                /// System variable SPLFRAME
194
                /// </summary>
195
                [CadSystemVariable("$SPLFRAME", 70)]
196
                public bool ShowSplineControlPoints { get; set; }
305✔
197

198
                /// <summary>
199
                /// Mirror text if nonzero <br/>
200
                /// System variable MIRRTEXT
201
                /// </summary>
202
                [CadSystemVariable("$MIRRTEXT", 70)]
203
                public bool MirrorText { get; set; } = false;
887✔
204

205
                /// <summary>
206
                /// Determines whether input for the DVIEW and VPOINT command evaluated as relative to the WCS or current UCS <br/>
207
                /// System variable WORLDVIEW
208
                /// </summary>
209
                [CadSystemVariable("$WORLDVIEW", 70)]
210
                public bool WorldView { get; set; }
305✔
211

212
                /// <summary>
213
                /// 1 for previous release compatibility mode; 0 otherwise <br/>
214
                /// System variable TILEMODE
215
                /// </summary>
216
                [CadSystemVariable("$TILEMODE", 70)]
217
                public bool ShowModelSpace { get; set; }
305✔
218

219
                /// <summary>
220
                /// Limits checking in paper space when nonzero <br/>
221
                /// System variable PLIMCHECK
222
                /// </summary>
223
                [CadSystemVariable("$PLIMCHECK", 70)]
224
                public bool PaperSpaceLimitsChecking { get; set; }
305✔
225

226
                /// <summary>
227
                /// Controls the properties of xref-dependent layers: <br/>
228
                /// 0 = Don't retain xref-dependent visibility settings <br/>
229
                /// 1 = Retain xref-dependent visibility settings <br/>
230
                /// System variable VISRETAIN
231
                /// </summary>
232
                [CadSystemVariable("$VISRETAIN", 70)]
233
                public bool RetainXRefDependentVisibilitySettings { get; set; }
305✔
234

235
                /// <summary>
236
                /// Controls the display of silhouette curves of body objects in Wireframe mode
237
                /// </summary>
238
                /// <remarks>
239
                /// System variable DISPSILH
240
                /// </remarks>
241
                [CadSystemVariable("$DISPSILH", 70)]
242
                public bool DisplaySilhouetteCurves { get; set; }
283✔
243

244
                /// <summary>
245
                /// 
246
                /// </summary>
247
                /// <remarks>
248
                /// System variable PELLIPSE (not present in DXF)
249
                /// </remarks>
250
                //[Obsolete("Not present in dxf or documentation")]
251
                public bool CreateEllipseAsPolyline { get; set; }
151✔
252

253
                /// <summary>
254
                /// Controls the saving of proxy object images
255
                /// </summary>
256
                /// <remarks>
257
                /// System variable PROXYGRAPHICS
258
                /// </remarks>
259
                [CadSystemVariable("$PROXYGRAPHICS", 70)]
260
                public bool ProxyGraphics { get; set; }
283✔
261

262
                /// <summary>
263
                /// Specifies the maximum depth of the spatial index
264
                /// </summary>
265
                /// <remarks>
266
                /// System variable TREEDEPTH
267
                /// </remarks>
268
                [CadSystemVariable("$TREEDEPTH", 70)]
269
                public short SpatialIndexMaxTreeDepth { get; set; } = 3020;
763✔
270

271
                /// <summary>
272
                /// Units format for coordinates and distances
273
                /// </summary>
274
                /// <remarks>
275
                /// System variable LUNITS
276
                /// </remarks>
277
                [CadSystemVariable("$LUNITS", 70)]
278
                public LinearUnitFormat LinearUnitFormat { get; set; } = LinearUnitFormat.Decimal;
887✔
279

280
                /// <summary>
281
                /// Units precision for coordinates and distances
282
                /// </summary>
283
                /// <remarks>
284
                /// System variable LUPREC
285
                /// </remarks>
286
                [CadSystemVariable("$LUPREC", 70)]
287
                public short LinearUnitPrecision { get; set; } = 4;
887✔
288

289
                /// <summary>
290
                /// Entity linetype name, or BYBLOCK or BYLAYER
291
                /// </summary>
292
                /// <remarks>
293
                /// System variable AUNITS
294
                /// </remarks>
295
                [CadSystemVariable("$AUNITS", 70)]
296
                public AngularUnitFormat AngularUnit { get; set; }
407✔
297

298
                /// <summary>
299
                /// Units precision for angles
300
                /// </summary>
301
                /// <remarks>
302
                /// System variable AUPREC
303
                /// </remarks>
304
                [CadSystemVariable("$AUPREC", 70)]
305
                public short AngularUnitPrecision { get; set; }
407✔
306

307
                /// <summary>
308
                /// Sets running object snaps, only for R13 - R14
309
                /// </summary>
310
                /// <remarks>
311
                /// System variable OSMODE
312
                /// </remarks>
313
                public ObjectSnapMode ObjectSnapMode { get; set; }
23✔
314

315
                /// <summary>
316
                /// Attribute visibility
317
                /// </summary>
318
                /// <remarks>
319
                /// System variable ATTMODE
320
                /// </remarks>
321
                [CadSystemVariable("$ATTMODE", 70)]
322
                public AttributeVisibilityMode AttributeVisibility { get; set; } = AttributeVisibilityMode.Normal;
887✔
323

324
                /// <summary>
325
                /// Point display mode
326
                /// </summary>
327
                /// <remarks>
328
                /// System variable PDMODE
329
                /// </remarks>
330
                [CadSystemVariable("$PDMODE", 70)]
331
                public short PointDisplayMode { get; set; }
407✔
332

333
                /// <summary>
334
                /// Integer variable intended for use by third-party developers
335
                /// </summary>
336
                /// <remarks>
337
                /// System variable USERI1
338
                /// </remarks>
339
                [CadSystemVariable("$USERI1", 70)]
340
                public short UserShort1 { get; set; }
305✔
341

342
                /// <summary>
343
                /// Integer variable intended for use by third-party developers
344
                /// </summary>
345
                /// <remarks>
346
                /// System variable USERI2
347
                /// </remarks>
348
                [CadSystemVariable("$USERI2", 70)]
349
                public short UserShort2 { get; set; }
305✔
350

351
                /// <summary>
352
                /// Integer variable intended for use by third-party developers
353
                /// </summary>
354
                /// <remarks>
355
                /// System variable USERI3
356
                /// </remarks>
357
                [CadSystemVariable("$USERI3", 70)]
358
                public short UserShort3 { get; set; }
305✔
359

360
                /// <summary>
361
                /// Integer variable intended for use by third-party developers
362
                /// </summary>
363
                /// <remarks>
364
                /// System variable USERI4
365
                /// </remarks>
366
                [CadSystemVariable("$USERI4", 70)]
367
                public short UserShort4 { get; set; }
305✔
368

369
                /// <summary>
370
                /// Integer variable intended for use by third-party developers
371
                /// </summary>
372
                /// <remarks>
373
                /// System variable USERI5
374
                /// </remarks>
375
                [CadSystemVariable("$USERI5", 70)]
376
                public short UserShort5 { get; set; }
305✔
377

378
                /// <summary>
379
                /// Undocumented
380
                /// </summary>
381
                /// <remarks>
382
                /// System variable SPLINESEGS
383
                /// </remarks>
384
                [CadSystemVariable("$SPLINESEGS", 70)]
385
                public short NumberOfSplineSegments { get; set; } = 8;
887✔
386

387
                /// <summary>
388
                /// Surface density (for PEDIT Smooth) in M direction
389
                /// </summary>
390
                /// <remarks>
391
                /// System variable SURFU
392
                /// </remarks>
393
                [CadSystemVariable("$SURFU", 70)]
394
                public short SurfaceDensityU { get; set; } = 6;
887✔
395

396
                /// <summary>
397
                /// Surface density(for PEDIT Smooth) in N direction
398
                /// </summary>
399
                /// <remarks>
400
                /// System variable SURFV
401
                /// </remarks>
402
                [CadSystemVariable("$SURFV", 70)]
403
                public short SurfaceDensityV { get; set; } = 6;
887✔
404

405
                /// <summary>
406
                /// Surface type for PEDIT Smooth
407
                /// </summary>
408
                /// <remarks>
409
                /// System variable SURFTYPE
410
                /// </remarks>
411
                [CadSystemVariable("$SURFTYPE", 70)]
412
                public short SurfaceType { get; set; } = 6;
785✔
413

414
                /// <summary>
415
                /// Number of mesh tabulations in first direction
416
                /// </summary>
417
                /// <remarks>
418
                /// System variable SURFTAB1
419
                /// </remarks>
420
                [CadSystemVariable("$SURFTAB1", 70)]
421
                public short SurfaceMeshTabulationCount1 { get; set; } = 6;
785✔
422

423
                /// <summary>
424
                /// Number of mesh tabulations in second direction
425
                /// </summary>
426
                /// <remarks>
427
                /// System variable SURFTAB2
428
                /// </remarks>
429
                [CadSystemVariable("$SURFTAB2", 70)]
430
                public short SurfaceMeshTabulationCount2 { get; set; } = 6;
785✔
431

432
                /// <summary>
433
                /// Spline curve type for PEDIT Spline
434
                /// </summary>
435
                /// <remarks>
436
                /// System variable SPLINETYPE
437
                /// </remarks>
438
                [CadSystemVariable("$SPLINETYPE", 70)]
439
                public SplineType SplineType { get; set; } = SplineType.CubicBSpline;
785✔
440

441
                /// <summary>
442
                /// Controls the shading of edges
443
                /// </summary>
444
                /// <remarks>
445
                /// System variable SHADEDGE
446
                /// </remarks>
447
                [CadSystemVariable("$SHADEDGE", 70)]
448
                public ShadeEdgeType ShadeEdge { get; set; }
305✔
449

450
                /// <summary>
451
                /// Percent ambient/diffuse light
452
                /// </summary>
453
                /// <remarks>
454
                /// System variable SHADEDIF
455
                /// </remarks>
456
                /// <value>
457
                /// range 1-100
458
                /// </value>
459
                [CadSystemVariable("$SHADEDIF", 70)]
460
                public short ShadeDiffuseToAmbientPercentage { get; set; } = 70;
785✔
461

462
                /// <summary>
463
                /// Low bit set = Display fractions, feet-and-inches, and surveyor's angles in input format
464
                /// </summary>
465
                /// <remarks>
466
                /// System variable UNITMODE
467
                /// </remarks>
468
                [CadSystemVariable("$UNITMODE", 70)]
469
                public short UnitMode { get; set; }
305✔
470

471
                /// <summary>
472
                /// Sets maximum number of viewports to be regenerated
473
                /// </summary>
474
                /// <remarks>
475
                /// System variable MAXACTVP
476
                /// </remarks>
477
                [CadSystemVariable("$MAXACTVP", 70)]
478
                public short MaxViewportCount { get; set; } = 64;
785✔
479

480
                /// <summary>
481
                /// 
482
                /// </summary>
483
                /// <remarks>
484
                /// System variable ISOLINES
485
                /// </remarks>
486
                public short SurfaceIsolineCount { get; set; }
151✔
487

488
                /// <summary>
489
                /// Current multiline justification
490
                /// </summary>
491
                /// <remarks>
492
                /// System variable CMLJUST
493
                /// </remarks>
494
                [CadSystemVariable("$CMLJUST", 70)]
495
                public VerticalAlignmentType CurrentMultilineJustification { get; set; } = VerticalAlignmentType.Top;
865✔
496

497
                /// <summary>
498
                /// 
499
                /// </summary>
500
                /// <remarks>
501
                /// System variable TEXTQLTY
502
                /// </remarks>
503
                public short TextQuality { get; set; }
151✔
504

505
                /// <summary>
506
                /// Global linetype scale
507
                /// </summary>
508
                /// <remarks>
509
                /// System variable LTSCALE
510
                /// </remarks>
511
                [CadSystemVariable("$LTSCALE", 40)]
512
                public double LineTypeScale { get; set; } = 1.0d;
887✔
513

514
                /// <summary>
515
                /// Default text height
516
                /// </summary>
517
                /// <remarks>
518
                /// System variable TEXTSIZE
519
                /// </remarks>
520
                [CadSystemVariable("$TEXTSIZE", 40)]
521
                public double TextHeightDefault { get; set; } = 2.5d;
887✔
522

523
                /// <summary>
524
                /// Current text style name
525
                /// </summary>
526
                /// <remarks>
527
                /// System variable TEXTSTYLE
528
                /// </remarks>
529
                [CadSystemVariable("$TEXTSTYLE", true, 7)]
530
                public string TextStyleName
531
                {
532
                        get { return this._currentTextStyle.Name; }
381✔
533
                        set
534
                        {
166✔
535
                                if (this.Document != null)
166!
536
                                {
×
537
                                        this._currentTextStyle = this.Document.TextStyles[value];
×
538
                                }
×
539
                                else
540
                                {
166✔
541
                                        this._currentTextStyle = new TextStyle(value);
166✔
542
                                }
166✔
543
                        }
166✔
544
                }
545

546
                /// <summary>
547
                /// Current layer name
548
                /// </summary>
549
                /// <remarks>
550
                /// System variable CLAYER
551
                /// </remarks>
552
                [CadSystemVariable("$CLAYER", true, 8)]
553
                public string CurrentLayerName
554
                {
555
                        get { return this._currentLayer.Name; }
384✔
556
                        set
557
                        {
166✔
558
                                if (this.Document != null)
166!
559
                                {
×
560
                                        this._currentLayer = this.Document.Layers[value];
×
561
                                }
×
562
                                else
563
                                {
166✔
564
                                        this._currentLayer = new Layer(value);
166✔
565
                                }
166✔
566
                        }
166✔
567
                }
568

569
                /// <summary>
570
                /// Entity linetype name, or BYBLOCK or BYLAYER
571
                /// </summary>
572
                /// <remarks>
573
                /// System variable CELTYPE
574
                /// </remarks>
575
                [CadSystemVariable("$CELTYPE", true, 6)]
576
                public string CurrentLineTypeName
577
                {
578
                        get { return this._currentLineType.Name; }
360✔
579
                        set
580
                        {
166✔
581
                                if (this.Document != null)
166!
582
                                {
×
583
                                        this._currentLineType = this.Document.LineTypes[value];
×
584
                                }
×
585
                                else
586
                                {
166✔
587
                                        this._currentLineType = new LineType(value);
166✔
588
                                }
166✔
589
                        }
166✔
590
                }
591

592
                /// <summary>
593
                /// Current multiline style name
594
                /// </summary>
595
                /// <remarks>
596
                /// System variable CMLSTYLE
597
                /// </remarks>
598
                [CadSystemVariable("$CMLSTYLE", true, 2)]
599
                public string MultiLineStyleName
600
                {
601
                        get { return this._currentMLineStyle.Name; }
270✔
602
                        set
603
                        {
144✔
604
                                if (this.Document != null)
144!
NEW
605
                                {
×
NEW
606
                                        this._currentMLineStyle = this.Document.MLineStyles[value];
×
NEW
607
                                }
×
608
                                else
609
                                {
144✔
610
                                        this._currentMLineStyle = new MLineStyle(value);
144✔
611
                                }
144✔
612
                        }
144✔
613
                }
614

615
                /// <summary>
616
                /// Default trace width
617
                /// </summary>
618
                /// <remarks>
619
                /// System variable TRACEWID
620
                /// </remarks>
621
                [CadSystemVariable("$TRACEWID", 40)]
622
                public double TraceWidthDefault { get; set; }
305✔
623

624
                /// <summary>
625
                /// Sketch record increment
626
                /// </summary>
627
                /// <remarks>
628
                /// System variable SKETCHINC
629
                /// </remarks>
630
                [CadSystemVariable("$SKETCHINC", 40)]
631
                public double SketchIncrement { get; set; }
305✔
632

633
                /// <summary>
634
                /// Sketch record increment
635
                /// </summary>
636
                /// <remarks>
637
                /// System variable FILLETRAD
638
                /// </remarks>
639
                [CadSystemVariable("$FILLETRAD", 40)]
640
                public double FilletRadius { get; set; }
305✔
641

642
                /// <summary>
643
                /// Sets the default 3D thickness property when creating 2D geometric objects.
644
                /// </summary>
645
                /// <remarks>
646
                /// System variable THICKNESS
647
                /// </remarks>
648
                [CadSystemVariable("$THICKNESS", 40)]
649
                public double ThicknessDefault { get; set; }
305✔
650

651
                /// <summary>
652
                /// Sets the zero (0) base angle with respect to the current UCS.
653
                /// </summary>
654
                /// <remarks>
655
                /// System variable ANGBASE
656
                /// </remarks>
657
                [CadSystemVariable("$ANGBASE", 50)]
658
                public double AngleBase { get; set; } = 0.0;
887✔
659

660
                /// <summary>
661
                /// Point display size
662
                /// </summary>
663
                /// <remarks>
664
                /// System variable PDSIZE
665
                /// </remarks>
666
                [CadSystemVariable("$PDSIZE", 40)]
667
                public double PointDisplaySize { get; set; } = 0.0d;
887✔
668

669
                /// <summary>
670
                /// Default polyline width
671
                /// </summary>
672
                /// <remarks>
673
                /// System variable PLINEWID
674
                /// </remarks>
675
                [CadSystemVariable("$PLINEWID", 40)]
676
                public double PolylineWidthDefault { get; set; }
305✔
677

678
                /// <summary>
679
                /// Real variable intended for use by third-party developers
680
                /// </summary>
681
                /// <remarks>
682
                /// System variable $USERR1
683
                /// </remarks>
684
                [CadSystemVariable("$USERR1", 40)]
685
                public double UserDouble1 { get; set; }
305✔
686

687
                /// <summary>
688
                /// Real variable intended for use by third-party developers
689
                /// </summary>
690
                /// <remarks>
691
                /// System variable $USERR2
692
                /// </remarks>
693
                [CadSystemVariable("$USERR2", 40)]
694
                public double UserDouble2 { get; set; }
305✔
695

696
                /// <summary>
697
                /// Real variable intended for use by third-party developers
698
                /// </summary>
699
                /// <remarks>
700
                /// System variable $USERR3
701
                /// </remarks>
702
                [CadSystemVariable("$USERR3", 40)]
703
                public double UserDouble3 { get; set; }
305✔
704

705
                /// <summary>
706
                /// Real variable intended for use by third-party developers
707
                /// </summary>
708
                /// <remarks>
709
                /// System variable $USERR4
710
                /// </remarks>
711
                [CadSystemVariable("$USERR4", 40)]
712
                public double UserDouble4 { get; set; }
305✔
713

714
                /// <summary>
715
                /// Real variable intended for use by third-party developers
716
                /// </summary>
717
                /// <remarks>
718
                /// System variable $USERR5
719
                /// </remarks>
720
                [CadSystemVariable("$USERR5", 40)]
721
                public double UserDouble5 { get; set; }
305✔
722

723
                /// <summary>
724
                /// First chamfer distance
725
                /// </summary>
726
                /// <remarks>
727
                /// System variable CHAMFERA
728
                /// </remarks>
729
                [CadSystemVariable("$CHAMFERA", 40)]
730
                public double ChamferDistance1 { get; set; }
305✔
731

732
                /// <summary>
733
                /// Second  chamfer distance
734
                /// </summary>
735
                /// <remarks>
736
                /// System variable CHAMFERB
737
                /// </remarks>
738
                [CadSystemVariable("$CHAMFERB", 40)]
739
                public double ChamferDistance2 { get; set; }
305✔
740

741
                /// <summary>
742
                /// Chamfer length
743
                /// </summary>
744
                /// <remarks>
745
                /// System variable CHAMFERC
746
                /// </remarks>
747
                [CadSystemVariable("$CHAMFERC", 40)]
748
                public double ChamferLength { get; set; }
283✔
749

750
                /// <summary>
751
                /// Chamfer angle
752
                /// </summary>
753
                /// <remarks>
754
                /// System variable CHAMFERD
755
                /// </remarks>
756
                [CadSystemVariable("$CHAMFERD", 40)]
757
                public double ChamferAngle { get; set; }
283✔
758

759
                /// <summary>
760
                /// Adjusts the smoothness of shaded and rendered objects, rendered shadows, and objects with hidden lines removed.
761
                /// </summary>
762
                /// <remarks>
763
                /// System variable FACETRES.
764
                /// </remarks>
765
                /// <value>
766
                /// Valid values are from 0.01 to 10.0.
767
                /// </value>
768
                [CadSystemVariable("$FACETRES", 40)]
769
                public double FacetResolution
770
                {
771
                        get
772
                        {
32✔
773
                                return this._facetResolution;
32✔
774
                        }
32✔
775
                        set
776
                        {
119✔
777
                                ObjectExtensions.InRange(value, 0.01, 10, "FACETRES valid values are from 0.01 to 10.0");
119✔
778
                                this._facetResolution = value;
119✔
779
                        }
119✔
780
                }
781

782
                private double _facetResolution = 0.5;
480✔
783

784
                /// <summary>
785
                /// Current multiline scale
786
                /// </summary>
787
                /// <remarks>
788
                /// System variable CMLSCALE
789
                /// </remarks>
790
                [CadSystemVariable("$CMLSCALE", 40)]
791
                public double CurrentMultilineScale { get; set; } = 20.0d;
865✔
792

793
                /// <summary>
794
                /// Current entity linetype scale
795
                /// </summary>
796
                /// <remarks>
797
                /// System variable CELTSCALE
798
                /// </remarks>
799
                [CadSystemVariable("$CELTSCALE", 40)]
800
                public double CurrentEntityLinetypeScale { get; set; } = 1.0d;
865✔
801

802
                /// <summary>
803
                /// Name of menu file
804
                /// </summary>
805
                /// <remarks>
806
                /// System variable MENU
807
                /// </remarks>
808
                [CadSystemVariable("$MENU", 1)]
809
                public string MenuFileName { get; set; } = ".";
785✔
810

811
                /// <summary>
812
                /// Next available handle
813
                /// </summary>
814
                /// <remarks>
815
                /// System variable HANDSEED
816
                /// </remarks>
817
                [CadSystemVariable("$HANDSEED", 5)]
818
                public ulong HandleSeed { get; internal set; } = 0x0;
32,769✔
819

820
                /// <summary>
821
                /// Local date/time of drawing creation (see Special Handling of Date/Time Variables)
822
                /// </summary>
823
                /// <remarks>
824
                /// System variable TDCREATE
825
                /// </remarks>
826
                [CadSystemVariable("$TDCREATE", 40)]
827
                public DateTime CreateDateTime { get; set; } = DateTime.Now;
911✔
828

829
                /// <summary>
830
                /// Universal date/time the drawing was created(see Special Handling of Date/Time Variables)
831
                /// </summary>
832
                /// <remarks>
833
                /// System variable TDUCREATE
834
                /// </remarks>
835
                [CadSystemVariable("$TDUCREATE", 40)]
836
                public DateTime UniversalCreateDateTime { get; set; } = DateTime.UtcNow;
714✔
837

838
                /// <summary>
839
                /// Local date/time of last drawing update(see Special Handling of Date/Time Variables)
840
                /// </summary>
841
                /// <remarks>
842
                /// System variable TDUPDATE
843
                /// </remarks>
844
                [CadSystemVariable("$TDUPDATE", 40)]
845
                public DateTime UpdateDateTime { get; set; } = DateTime.Now;
914✔
846

847
                /// <summary>
848
                /// Universal date/time of the last update/save(see Special Handling of Date/Time Variables)
849
                /// </summary>
850
                /// <remarks>
851
                /// System variable TDUUPDATE
852
                /// </remarks>
853
                [CadSystemVariable("$TDUUPDATE", 40)]
854
                public DateTime UniversalUpdateDateTime { get; set; } = DateTime.UtcNow;
735✔
855

856
                /// <summary>
857
                /// Cumulative editing time for this drawing(see Special Handling of Date/Time Variables)
858
                /// </summary>
859
                /// <remarks>
860
                /// System variable TDINDWG
861
                /// </remarks>
862
                [CadSystemVariable("$TDINDWG", 40)]
863
                public TimeSpan TotalEditingTime { get; set; } = new TimeSpan();
887✔
864

865
                /// <summary>
866
                /// User-elapsed timer
867
                /// </summary>
868
                /// <remarks>
869
                /// System variable TDUSRTIMER
870
                /// </remarks>
871
                [CadSystemVariable("$TDUSRTIMER", 40)]
872
                public TimeSpan UserElapsedTimeSpan { get; set; }
305✔
873

874
                /// <summary>
875
                /// Current entity color number
876
                /// </summary>
877
                /// <remarks>
878
                /// System variable CECOLOR
879
                /// </remarks>
880
                [CadSystemVariable("$CECOLOR", 62)]
881
                public Color CurrentEntityColor { get; set; } = Color.ByLayer;
889✔
882

883
                /// <summary>
884
                /// View scale factor for new viewports
885
                /// </summary>
886
                /// <remarks>
887
                /// System variable PSVPSCALE
888
                /// </remarks>
889
                [CadSystemVariable("$PSVPSCALE", 40)]
890
                public double ViewportDefaultViewScaleFactor { get; set; }
260✔
891

892
                /// <summary>
893
                /// Insertion base set by BASE command(in WCS)
894
                /// </summary>
895
                /// <remarks>
896
                /// System variable PINSBASE
897
                /// </remarks>
898
                [CadSystemVariable("$PINSBASE", 10, 20, 30)]
899
                public XYZ PaperSpaceInsertionBase { get; set; } = XYZ.Zero;
763✔
900

901
                /// <summary>
902
                /// X, Y, and Z drawing extents lower-left corner (in WCS)
903
                /// </summary>
904
                /// <remarks>
905
                /// System variable PEXTMIN
906
                /// </remarks>
907
                [CadSystemVariable("$PEXTMIN", 10, 20, 30)]
908
                public XYZ PaperSpaceExtMin { get; set; }
305✔
909

910
                /// <summary>
911
                /// X, Y, and Z drawing extents upper-right corner(in WCS)
912
                /// </summary>
913
                /// <remarks>
914
                /// System variable PEXTMAX
915
                /// </remarks>
916
                [CadSystemVariable("$PEXTMAX", 10, 20, 30)]
917
                public XYZ PaperSpaceExtMax { get; set; }
305✔
918

919
                /// <summary>
920
                /// XY drawing limits lower-left corner(in WCS)
921
                /// </summary>
922
                /// <remarks>
923
                /// System variable PLIMMIN
924
                /// </remarks>
925
                [CadSystemVariable("$PLIMMIN", 10, 20)]
926
                public XY PaperSpaceLimitsMin { get; set; }
305✔
927

928
                /// <summary>
929
                /// XY drawing limits upper-right corner (in WCS)
930
                /// </summary>
931
                /// <remarks>
932
                /// System variable PLIMMAX
933
                /// </remarks>
934
                [CadSystemVariable("$PLIMMAX", 10, 20)]
935
                public XY PaperSpaceLimitsMax { get; set; }
305✔
936

937
                /// <summary>
938
                /// Current elevation set by ELEV command
939
                /// </summary>
940
                /// <remarks>
941
                /// System variable PELEVATION
942
                /// </remarks>
943
                [CadSystemVariable("$PELEVATION", 40)]
944
                public double PaperSpaceElevation
945
                {
946
                        get { return this.PaperSpaceUcs.Elevation; }
96✔
947
                        set
948
                        {
273✔
949
                                this.PaperSpaceUcs.Elevation = value;
273✔
950
                        }
273✔
951
                }
952

953
                /// <summary>
954
                /// Name of the UCS that defines the origin and orientation of orthographic UCS settings (paper space only)
955
                /// </summary>
956
                /// <remarks>
957
                /// System variable PUCSBASE
958
                /// </remarks>
959
                [CadSystemVariable("$PUCSBASE", true, 2)]
960
                public string PaperSpaceBaseName
961
                {
962
                        get { return this.PaperSpaceUcsBase.Name; }
×
963
                        set
964
                        {
×
965
                                this.PaperSpaceUcsBase.Name = value;
×
966
                        }
×
967
                }
968

969
                /// <summary>
970
                /// Current paper space UCS name
971
                /// </summary>
972
                /// <remarks>
973
                /// System variable PUCSNAME
974
                /// </remarks>
975
                [CadSystemVariable("$PUCSNAME", true, 2)]
976
                public string PaperSpaceName
977
                {
978
                        get { return this.PaperSpaceUcs.Name; }
×
979
                        set
980
                        {
×
981
                                this.PaperSpaceUcs.Name = value;
×
982
                        }
×
983
                }
984

985
                /// <summary>
986
                /// Origin of current UCS (in WCS)
987
                /// </summary>
988
                /// <remarks>
989
                /// System variable PUCSORG
990
                /// </remarks>
991
                [CadSystemVariable("$PUCSORG", 10, 20, 30)]
992
                public XYZ PaperSpaceUcsOrigin
993
                {
994
                        get { return this.PaperSpaceUcs.Origin; }
96✔
995
                        set
996
                        {
273✔
997
                                this.PaperSpaceUcs.Origin = value;
273✔
998
                        }
273✔
999
                }
1000

1001
                /// <summary>
1002
                /// Direction of the current UCS X axis (in WCS)
1003
                /// </summary>
1004
                /// <remarks>
1005
                /// System variable PUCSXDIR
1006
                /// </remarks>
1007
                [CadSystemVariable("$PUCSXDIR", 10, 20, 30)]
1008
                public XYZ PaperSpaceUcsXAxis
1009
                {
1010
                        get { return this.PaperSpaceUcs.XAxis; }
96✔
1011
                        set
1012
                        {
273✔
1013
                                this.PaperSpaceUcs.XAxis = value;
273✔
1014
                        }
273✔
1015
                }
1016

1017
                /// <summary>
1018
                /// Direction of the current UCS Y aYis (in WCS)
1019
                /// </summary>
1020
                /// <remarks>
1021
                /// System variable PUCSYDIR
1022
                /// </remarks>
1023
                [CadSystemVariable("$PUCSYDIR", 10, 20, 30)]
1024
                public XYZ PaperSpaceUcsYAxis
1025
                {
1026
                        get { return this.PaperSpaceUcs.YAxis; }
96✔
1027
                        set
1028
                        {
273✔
1029
                                this.PaperSpaceUcs.YAxis = value;
273✔
1030
                        }
273✔
1031
                }
1032

1033
                /// <summary>
1034
                /// Point which becomes the new UCS origin after changing paper space UCS to TOP when PUCSBASE is set to WORLD
1035
                /// </summary>
1036
                /// <remarks>
1037
                /// System variable PUCSORGTOP
1038
                /// </remarks>
1039
                [CadSystemVariable("$PUCSORGTOP", 10, 20, 30)]
1040
                public XYZ PaperSpaceOrthographicTopDOrigin { get; set; }
260✔
1041

1042
                /// <summary>
1043
                /// Point which becomes the new UCS origin after changing paper space UCS to BOTTOM when PUCSBASE is set to WORLD
1044
                /// </summary>
1045
                /// <remarks>
1046
                /// System variable PUCSORGBOTTOM
1047
                /// </remarks>
1048
                [CadSystemVariable("$PUCSORGBOTTOM", 10, 20, 30)]
1049
                public XYZ PaperSpaceOrthographicBottomDOrigin { get; set; }
260✔
1050

1051
                /// <summary>
1052
                /// Point which becomes the new UCS origin after changing paper space UCS to LEFT when PUCSBASE is set to WORLD
1053
                /// </summary>
1054
                /// <remarks>
1055
                /// System variable PUCSORGLEFT
1056
                /// </remarks>
1057
                [CadSystemVariable("$PUCSORGLEFT", 10, 20, 30)]
1058
                public XYZ PaperSpaceOrthographicLeftDOrigin { get; set; }
260✔
1059

1060
                /// <summary>
1061
                /// Point which becomes the new UCS origin after changing paper space UCS to RIGHT when PUCSBASE is set to WORLD
1062
                /// </summary>
1063
                /// <remarks>
1064
                /// System variable PUCSORGRIGHT
1065
                /// </remarks>
1066
                [CadSystemVariable("$PUCSORGRIGHT", 10, 20, 30)]
1067
                public XYZ PaperSpaceOrthographicRightDOrigin { get; set; }
260✔
1068

1069
                /// <summary>
1070
                /// Point which becomes the new UCS origin after changing paper space UCS to FRONT when PUCSBASE is set to WORLD
1071
                /// </summary>
1072
                /// <remarks>
1073
                /// System variable PUCSORGFRONT
1074
                /// </remarks>
1075
                [CadSystemVariable("$PUCSORGFRONT", 10, 20, 30)]
1076
                public XYZ PaperSpaceOrthographicFrontDOrigin { get; set; }
260✔
1077

1078
                /// <summary>
1079
                /// Point which becomes the new UCS origin after changing paper space UCS to BACK when PUCSBASE is set to WORLD
1080
                /// </summary>
1081
                /// <remarks>
1082
                /// System variable PUCSORGBACK
1083
                /// </remarks>
1084
                [CadSystemVariable("$PUCSORGBACK", 10, 20, 30)]
1085
                public XYZ PaperSpaceOrthographicBackDOrigin { get; set; }
260✔
1086

1087
                /// <summary>
1088
                /// Point which becomes the new UCS origin after changing model space UCS to TOP when PUCSBASE is set to WORLD
1089
                /// </summary>
1090
                /// <remarks>
1091
                /// System variable UCSORGTOP
1092
                /// </remarks>
1093
                [CadSystemVariable("$UCSORGTOP", 10, 20, 30)]
1094
                public XYZ ModelSpaceOrthographicTopDOrigin { get; set; }
260✔
1095

1096
                /// <summary>
1097
                /// Point which becomes the new UCS origin after changing model space UCS to BOTTOM when PUCSBASE is set to WORLD
1098
                /// </summary>
1099
                /// <remarks>
1100
                /// System variable UCSORGBOTTOM
1101
                /// </remarks>
1102
                [CadSystemVariable("$UCSORGBOTTOM", 10, 20, 30)]
1103
                public XYZ ModelSpaceOrthographicBottomDOrigin { get; set; }
260✔
1104

1105
                /// <summary>
1106
                /// Point which becomes the new UCS origin after changing model space UCS to LEFT when PUCSBASE is set to WORLD
1107
                /// </summary>
1108
                /// <remarks>
1109
                /// System variable UCSORGLEFT
1110
                /// </remarks>
1111
                [CadSystemVariable("$UCSORGLEFT", 10, 20, 30)]
1112
                public XYZ ModelSpaceOrthographicLeftDOrigin { get; set; }
260✔
1113

1114
                /// <summary>
1115
                /// Point which becomes the new UCS origin after changing model space UCS to RIGHT when PUCSBASE is set to WORLD
1116
                /// </summary>
1117
                /// <remarks>
1118
                /// System variable UCSORGRIGHT
1119
                /// </remarks>
1120
                [CadSystemVariable("$UCSORGRIGHT", 10, 20, 30)]
1121
                public XYZ ModelSpaceOrthographicRightDOrigin { get; set; }
260✔
1122

1123
                /// <summary>
1124
                /// Point which becomes the new UCS origin after changing model space UCS to FRONT when PUCSBASE is set to WORLD
1125
                /// </summary>
1126
                /// <remarks>
1127
                /// System variable UCSORGFRONT
1128
                /// </remarks>
1129
                [CadSystemVariable("$UCSORGFRONT", 10, 20, 30)]
1130
                public XYZ ModelSpaceOrthographicFrontDOrigin { get; set; }
260✔
1131

1132
                /// <summary>
1133
                /// Point which becomes the new UCS origin after changing model space UCS to BACK when PUCSBASE is set to WORLD
1134
                /// </summary>
1135
                /// <remarks>
1136
                /// System variable UCSORGBACK
1137
                /// </remarks>
1138
                [CadSystemVariable("$UCSORGBACK", 10, 20, 30)]
1139
                public XYZ ModelSpaceOrthographicBackDOrigin { get; set; }
260✔
1140

1141
                /// <summary>
1142
                /// Insertion base set by BASE command(in WCS)
1143
                /// </summary>
1144
                /// <remarks>
1145
                /// System variable INSBASE
1146
                /// </remarks>
1147
                [CadSystemVariable("$INSBASE", 10, 20, 30)]
1148
                public XYZ ModelSpaceInsertionBase { get; set; } = XYZ.Zero;
977✔
1149

1150
                /// <summary>
1151
                /// X, Y, and Z drawing extents lower-left corner (in WCS)
1152
                /// </summary>
1153
                /// <remarks>
1154
                /// System variable EXTMIN
1155
                /// </remarks>
1156
                [CadSystemVariable("$EXTMIN", 10, 20, 30)]
1157
                public XYZ ModelSpaceExtMin { get; set; }
305✔
1158

1159
                /// <summary>
1160
                /// X, Y, and Z drawing extents upper-right corner(in WCS)
1161
                /// </summary>
1162
                /// <remarks>
1163
                /// System variable EXTMAX
1164
                /// </remarks>
1165
                [CadSystemVariable("$EXTMAX", 10, 20, 30)]
1166
                public XYZ ModelSpaceExtMax { get; set; }
305✔
1167

1168
                /// <summary>
1169
                /// XY drawing limits lower-left corner (in WCS)
1170
                /// </summary>
1171
                /// <remarks>
1172
                /// System variable LIMMIN
1173
                /// </remarks>
1174
                [CadSystemVariable("$LIMMIN", 10, 20)]
1175
                public XY ModelSpaceLimitsMin { get; set; }
305✔
1176

1177
                /// <summary>
1178
                /// XY drawing limits upper-right corner (in WCS)
1179
                /// </summary>
1180
                /// <remarks>
1181
                /// System variable LIMMAX
1182
                /// </remarks>
1183
                [CadSystemVariable("$LIMMAX", 10, 20)]
1184
                public XY ModelSpaceLimitsMax { get; set; }
305✔
1185

1186
                /// <summary>
1187
                /// Name of the UCS that defines the origin and orientation of orthographic UCS settings
1188
                /// </summary>
1189
                /// <remarks>
1190
                /// System variable UCSBASE
1191
                /// </remarks>
1192
                [CadSystemVariable("$UCSBASE", true, 2)]
1193
                public string UcsBaseName
1194
                {
1195
                        get { return this.ModelSpaceUcsBase.Name; }
×
1196
                        set
1197
                        {
×
1198
                                this.ModelSpaceUcsBase.Name = value;
×
1199
                        }
×
1200
                }
1201

1202
                /// <summary>
1203
                /// Name of current UCS
1204
                /// </summary>
1205
                /// <remarks>
1206
                /// System variable UCSNAME
1207
                /// </remarks>
1208
                [CadSystemVariable("$UCSNAME", true, 2)]
1209
                public string UcsName
1210
                {
1211
                        get { return this.ModelSpaceUcs.Name; }
×
1212
                        set
1213
                        {
×
1214
                                this.ModelSpaceUcs.Name = value;
×
1215
                        }
×
1216
                }
1217

1218
                /// <summary>
1219
                /// Current elevation set by ELEV command
1220
                /// </summary>
1221
                /// <remarks>
1222
                /// System variable ELEVATION
1223
                /// </remarks>
1224
                [CadSystemVariable("$ELEVATION", 40)]
1225
                public double Elevation
1226
                {
1227
                        get { return this.ModelSpaceUcs.Elevation; }
96✔
1228
                        set
1229
                        {
273✔
1230
                                this.ModelSpaceUcs.Elevation = value;
273✔
1231
                        }
273✔
1232
                }
1233

1234
                /// <summary>
1235
                /// Origin of current UCS(in WCS)
1236
                /// </summary>
1237
                /// <remarks>
1238
                /// System variable UCSORG
1239
                /// </remarks>
1240
                [CadSystemVariable("$UCSORG", 10, 20, 30)]
1241
                public XYZ ModelSpaceOrigin
1242
                {
1243
                        get { return this.ModelSpaceUcs.Origin; }
96✔
1244
                        set
1245
                        {
273✔
1246
                                this.ModelSpaceUcs.Origin = value;
273✔
1247
                        }
273✔
1248
                }
1249

1250
                /// <summary>
1251
                /// Direction of the current UCS X axis (in WCS)
1252
                /// </summary>
1253
                /// <remarks>
1254
                /// System variable UCSXDIR
1255
                /// </remarks>
1256
                [CadSystemVariable("$UCSXDIR", 10, 20, 30)]
1257
                public XYZ ModelSpaceXAxis
1258
                {
1259
                        get { return this.ModelSpaceUcs.XAxis; }
96✔
1260
                        set
1261
                        {
273✔
1262
                                this.ModelSpaceUcs.XAxis = value;
273✔
1263
                        }
273✔
1264
                }
1265

1266
                /// <summary>
1267
                /// Direction of the current UCS Y axis (in WCS)
1268
                /// </summary>
1269
                /// <remarks>
1270
                /// System variable UCSYDIR
1271
                /// </remarks>
1272
                [CadSystemVariable("$UCSYDIR", 10, 20, 30)]
1273
                public XYZ ModelSpaceYAxis
1274
                {
1275
                        get { return this.ModelSpaceUcs.YAxis; }
96✔
1276
                        set
1277
                        {
273✔
1278
                                this.ModelSpaceUcs.YAxis = value;
273✔
1279
                        }
273✔
1280
                }
1281

1282
                /// <summary>
1283
                /// Arrow block name
1284
                /// </summary>
1285
                /// <remarks>
1286
                /// System variable DIMBLK
1287
                /// </remarks>
1288
                [CadSystemVariable("$DIMBLK", 1)]
1289
                public string DimensionBlockName { get; set; } = string.Empty;
657✔
1290

1291
                /// <summary>
1292
                /// Arrow block name for leaders
1293
                /// </summary>
1294
                /// <remarks>
1295
                /// System variable DIMLDRBLK
1296
                /// </remarks>
1297
                [CadSystemVariable("$DIMLDRBLK", 1)]
1298
                public string ArrowBlockName { get; set; } = string.Empty;
612✔
1299

1300
                /// <summary>
1301
                /// First arrow block name
1302
                /// </summary>
1303
                /// <remarks>
1304
                /// System variable DIMBLK1
1305
                /// </remarks>
1306
                [CadSystemVariable("$DIMBLK1", 1)]
1307
                public string DimensionBlockNameFirst { get; set; }
177✔
1308

1309
                /// <summary>
1310
                /// Second arrow block name
1311
                /// </summary>
1312
                /// <remarks>
1313
                /// System variable DIMBLK2
1314
                /// </remarks>
1315
                [CadSystemVariable("$DIMBLK2", 1)]
1316
                public string DimensionBlockNameSecond { get; set; }
177✔
1317

1318
                /// <remarks>
1319
                /// System variable TSTACKALIGN, default = 1(not present in DXF)
1320
                /// </remarks>
1321
                public short StackedTextAlignment { get; internal set; } = 1;
608✔
1322

1323
                /// <remarks>
1324
                /// TSTACKSIZE, default = 70(not present in DXF)
1325
                /// </remarks>
1326
                public short StackedTextSizePercentage { get; internal set; } = 70;
608✔
1327

1328
                /// <summary>
1329
                /// Path for all relative hyperlinks in the drawing. If null, the drawing path is used
1330
                /// </summary>
1331
                /// <remarks>
1332
                /// System variable HYPERLINKBASE
1333
                /// </remarks>
1334
                [CadSystemVariable("$HYPERLINKBASE", 1)]
1335
                public string HyperLinkBase { get; set; }
260✔
1336

1337
                /// <summary>
1338
                /// Line weight of new objects
1339
                /// </summary>
1340
                /// <remarks>
1341
                /// System variable CELWEIGHT
1342
                /// </remarks>
1343
                [CadSystemVariable("$CELWEIGHT", 370)]
1344
                public LineweightType CurrentEntityLineWeight { get; set; } = LineweightType.ByLayer;
842✔
1345

1346
                /// <summary>
1347
                /// Line weight end-caps setting for new objects
1348
                /// </summary>
1349
                /// <remarks>
1350
                /// System variable ENDCAPS
1351
                /// </remarks>
1352
                [CadSystemVariable("$ENDCAPS", 280)]
1353
                public short EndCaps { get; set; }
260✔
1354

1355
                /// <summary>
1356
                /// Line weight joint setting for new objects
1357
                /// </summary>
1358
                /// <remarks>
1359
                /// System variable JOINSTYLE
1360
                /// </remarks>
1361
                [CadSystemVariable("$JOINSTYLE", 280)]
1362
                public short JoinStyle { get; set; }
260✔
1363

1364
                /// <summary>
1365
                /// Controls whether the lineweights of objects are displayed.<br/>
1366
                /// 0 = Lineweight is not displayed<br/>
1367
                /// 1 = Lineweight is displayed
1368
                /// </summary>
1369
                /// <remarks>
1370
                /// System variable LWDISPLAY
1371
                /// </remarks>
1372
                [CadSystemVariable("$LWDISPLAY", 290)]
1373
                public bool DisplayLineWeight { get; set; } = false;
842✔
1374

1375
                /// <summary>
1376
                /// Controls whether the current drawing can be edited in-place when being referenced by another drawing
1377
                /// </summary>
1378
                /// <remarks>
1379
                /// System variable XEDIT
1380
                /// </remarks>
1381
                [CadSystemVariable("$XEDIT", 290)]
1382
                public bool XEdit { get; set; }
260✔
1383

1384
                /// <summary>
1385
                /// Controls symbol table naming
1386
                /// </summary>
1387
                /// <remarks>
1388
                /// System variable EXTNAMES
1389
                /// </remarks>
1390
                [CadSystemVariable("$EXTNAMES", 290)]
1391
                public bool ExtendedNames { get; set; } = true;
842✔
1392

1393
                /// <summary>
1394
                /// Indicates whether the current drawing is in a Color-Dependent or Named Plot Style mode
1395
                /// </summary>
1396
                /// <remarks>
1397
                /// System variable PSTYLEMODE
1398
                /// </remarks>
1399
                [CadSystemVariable("$PSTYLEMODE", 290)]
1400
                public short PlotStyleMode { get; set; }
260✔
1401

1402
                /// <remarks>
1403
                /// System variable OLESTARTUP
1404
                /// </remarks>
1405
                //[CadSystemVariable("$OLESTARTUP", 290)]
1406
                public bool LoadOLEObject { get; set; }
128✔
1407

1408
                /// <summary>
1409
                /// Default drawing units for blocks
1410
                /// </summary>
1411
                /// <remarks>
1412
                /// System variable INSUNITS
1413
                /// </remarks>
1414
                [CadSystemVariable("$INSUNITS", 70)]
1415
                public UnitsType InsUnits { get; set; } = UnitsType.Unitless;
842✔
1416

1417
                /// <summary>
1418
                /// Plot style type of new objects
1419
                /// </summary>
1420
                /// <remarks>
1421
                /// System variable CEPSNTYPE
1422
                /// </remarks>
1423
                [CadSystemVariable("$CEPSNTYPE", 380)]
1424
                public EntityPlotStyleType CurrentEntityPlotStyle { get; set; }
388✔
1425

1426
                /// <summary>
1427
                /// Set at creation time, uniquely identifies a particular drawing
1428
                /// </summary>
1429
                /// <remarks>
1430
                /// System variable FINGERPRINTGUID
1431
                /// </remarks>
1432
                [CadSystemVariable("$FINGERPRINTGUID", 2)]
1433
                public string FingerPrintGuid { get; internal set; } = Guid.NewGuid().ToString();
740✔
1434

1435
                /// <summary>
1436
                /// Uniquely identifies a particular version of a drawing. Updated when the drawing is modified
1437
                /// </summary>
1438
                /// <remarks>
1439
                /// System variable VERSIONGUID
1440
                /// </remarks>
1441
                [CadSystemVariable("$VERSIONGUID", 2)]
1442
                public string VersionGuid { get; internal set; } = Guid.NewGuid().ToString();
740✔
1443

1444
                /// <summary>
1445
                /// Controls the object sorting methods
1446
                /// </summary>
1447
                /// <remarks>
1448
                /// System variable SORTENTS
1449
                /// </remarks>
1450
                [CadSystemVariable("$SORTENTS", 280)]
1451
                public ObjectSortingFlags EntitySortingFlags { get; set; }
218✔
1452

1453
                /// <summary>
1454
                /// Controls whether layer and spatial indexes are created and saved in drawing files
1455
                /// </summary>
1456
                /// <remarks>
1457
                /// System variable INDEXCTL
1458
                /// </remarks>
1459
                [CadSystemVariable("$INDEXCTL", 280)]
1460
                public IndexCreationFlags IndexCreationFlags { get; set; }
218✔
1461

1462
                /// <summary>
1463
                /// Specifies HIDETEXT system variable
1464
                /// </summary>
1465
                /// <remarks>
1466
                /// System variable HIDETEXT
1467
                /// </remarks>
1468
                [CadSystemVariable("$HIDETEXT", 280)]   //note: mismatch with docs, code 290
1469
                public byte HideText { get; set; }
218✔
1470

1471
                /// <summary>
1472
                /// Controls the visibility of xref clipping boundaries
1473
                /// </summary>
1474
                /// <remarks>
1475
                /// System variable XCLIPFRAME
1476
                /// </remarks>
1477
                [CadSystemVariable("$XCLIPFRAME", 280)] //note: mismatch with docs, code 290
1478
                public byte ExternalReferenceClippingBoundaryType { get; set; }
218✔
1479

1480
                /// <summary>
1481
                /// Controls the associativity of dimension objects
1482
                /// </summary>
1483
                /// <remarks>
1484
                /// System variable DIMASSOC
1485
                /// </remarks>
1486
                [CadSystemVariable("$DIMASSOC", 280)]
1487
                public DimensionAssociation DimensionAssociativity { get; set; } = DimensionAssociation.CreateExplodedDimensions;
698✔
1488

1489
                /// <summary>
1490
                /// Specifies a gap to be displayed where an object is hidden by another object; the value is specified as a percent of one unit and is independent of the zoom level.A haloed line is shortened at the point where it is hidden when HIDE or the Hidden option of SHADEMODE is used
1491
                /// </summary>
1492
                /// <remarks>
1493
                /// System variable HALOGAP
1494
                /// </remarks>
1495
                [CadSystemVariable("$HALOGAP", 280)]
1496
                public byte HaloGapPercentage { get; set; } = 0;
698✔
1497

1498
                public Color ObscuredColor { get; set; }
108✔
1499

1500
                /// <summary>
1501
                /// Represents the ACI color index of the "interference objects" created during the INTERFERE command. Default value is 1
1502
                /// </summary>
1503
                /// <remarks>
1504
                /// System variable INTERFERECOLOR
1505
                /// </remarks>
1506
                [CadSystemVariable("$INTERFERECOLOR", 62)]
1507
                public Color InterfereColor { get; set; } = new Color(1);
761✔
1508

1509
                /// <remarks>
1510
                /// System variable OBSCUREDLTYPE
1511
                /// </remarks>
1512
                public byte ObscuredType { get; set; }
108✔
1513

1514
                public byte IntersectionDisplay { get; set; }
108✔
1515

1516
                /// <summary>
1517
                /// Assigns a project name to the current drawing. Used when an external reference or image is not found on its original path. The project name points to a section in the registry that can contain one or more search paths for each project name defined. Project names and their search directories are created from the Files tab of the Options dialog box
1518
                /// </summary>
1519
                /// <remarks>
1520
                /// System variable PROJECTNAME
1521
                /// </remarks>
1522
                [CadSystemVariable("$PROJECTNAME", 1)]
1523
                public string ProjectName { get; set; }
218✔
1524

1525
                /// <remarks>
1526
                /// System variable CAMERADISPLAY
1527
                /// </remarks>
1528
                [CadSystemVariable("$CAMERADISPLAY", 290)]
1529
                public bool CameraDisplayObjects { get; set; }
173✔
1530

1531
                /// <summary>
1532
                /// Specifies the number of steps taken per second when you are in walk or fly mode.
1533
                /// </summary>
1534
                /// <remarks>
1535
                /// System variable STEPSPERSEC
1536
                /// </remarks>
1537
                /// <value>
1538
                /// Valid values are from 1 to 30
1539
                /// </value>
1540
                [CadSystemVariable("$STEPSPERSEC", 40)]
1541
                public double StepsPerSecond
1542
                {
1543
                        get
1544
                        {
17✔
1545
                                return this._stepsPerSecond;
17✔
1546
                        }
17✔
1547
                        set
1548
                        {
156✔
1549
                                ObjectExtensions.InRange(value, 1, 30, "STEPSPERSEC valid values are from 1 to 30");
156✔
1550
                                this._stepsPerSecond = value;
156✔
1551
                        }
156✔
1552
                }
1553

1554
                private double _stepsPerSecond = 2.0d;
480✔
1555

1556
                /// <summary>
1557
                /// Specifies the size of each step when in walk or fly mode, in drawing units.
1558
                /// </summary>
1559
                /// <remarks>
1560
                /// System variable STEPSIZE
1561
                /// </remarks>
1562
                [CadSystemVariable("$STEPSIZE", 40)]
1563
                public double StepSize { get; set; } = 6.0d;
653✔
1564

1565
                public double Dw3DPrecision { get; set; }
85✔
1566
                public double LensLength { get; set; }
85✔
1567
                public double CameraHeight { get; set; }
85✔
1568
                public char SolidsRetainHistory { get; set; }
85✔
1569
                public char ShowSolidsHistory { get; set; }
85✔
1570
                public double SweptSolidWidth { get; set; }
85✔
1571
                public double SweptSolidHeight { get; set; }
85✔
1572
                public double DraftAngleFirstCrossSection { get; set; }
85✔
1573
                public double DraftAngleSecondCrossSection { get; set; }
85✔
1574
                public double DraftMagnitudeFirstCrossSection { get; set; }
85✔
1575
                public double DraftMagnitudeSecondCrossSection { get; set; }
85✔
1576
                public short SolidLoftedShape { get; set; }
85✔
1577
                public char LoftedObjectNormals { get; set; }
85✔
1578

1579
                /// <summary>
1580
                /// Specifies the latitude of the drawing model in decimal format.
1581
                /// </summary>
1582
                /// <remarks>
1583
                /// System variable LATITUDE
1584
                /// </remarks>
1585
                [CadSystemVariable("$LATITUDE", 40)]
1586
                public double Latitude { get; set; } = 37.7950d;
653✔
1587

1588
                /// <summary>
1589
                /// Specifies the longitude of the drawing model in decimal format.
1590
                /// </summary>
1591
                /// <remarks>
1592
                /// System variable LONGITUDE
1593
                /// </remarks>
1594
                [CadSystemVariable("$LONGITUDE", 40)]
1595
                public double Longitude { get; set; } = -122.394d;
653✔
1596

1597
                /// <remarks>
1598
                /// System variable NORTHDIRECTION
1599
                /// </remarks>
1600
                [CadSystemVariable("$NORTHDIRECTION", 40)]
1601
                public double NorthDirection { get; set; }
173✔
1602

1603
                /// <summary>
1604
                /// Sets the time zone for the sun in the drawing.
1605
                /// </summary>
1606
                /// <remarks>
1607
                /// The values in the table are expressed as hours and minutes away from Greenwich Mean Time. You can also change this value in the Geographic Location dialog box when you set or edit geographic location information for the drawing file.
1608
                /// <br/>
1609
                /// System variable TIMEZONE
1610
                /// </remarks>
1611
                [CadSystemVariable("$TIMEZONE", 70)]
1612
                public int TimeZone { get; set; } = 0;        //Create enum for variable
653✔
1613

1614
                public char DisplayLightGlyphs { get; set; }
85✔
1615

1616
                /// <remarks>
1617
                /// System variable DWFFRAME
1618
                /// </remarks>
1619
                [CadSystemVariable("$DWFFRAME", 280)]
1620
                public char DwgUnderlayFramesVisibility { get; set; }
173✔
1621

1622
                /// <remarks>
1623
                /// System variable DGNFRAME
1624
                /// </remarks>
1625
                [CadSystemVariable("$DGNFRAME", 280)]
1626
                public char DgnUnderlayFramesVisibility { get; set; }
173✔
1627

1628
                /// <summary>
1629
                /// Shadow mode for a 3D object
1630
                /// </summary>
1631
                /// <remarks>
1632
                /// System variable CSHADOW
1633
                /// </remarks>
1634
                [CadSystemVariable("$CSHADOW", 280)]
1635
                public ShadowMode ShadowMode { get; set; }
173✔
1636

1637
                /// <summary>
1638
                /// Location of the ground shadow plane. This is a Z axis ordinate
1639
                /// </summary>
1640
                /// <remarks>
1641
                /// System variable SHADOWPLANELOCATION
1642
                /// </remarks>
1643
                [CadSystemVariable("$SHADOWPLANELOCATION", 40)]
1644
                public double ShadowPlaneLocation { get; set; }
173✔
1645

1646
                public string StyleSheetName { get; set; }
128✔
1647

1648
                /// <summary>
1649
                /// Dimension text style
1650
                /// </summary>
1651
                /// <remarks>
1652
                /// System variable DIMTXSTY
1653
                /// </remarks>
1654
                [CadSystemVariable("$DIMTXSTY", true, 7)]
1655
                public string DimensionTextStyleName
1656
                {
1657
                        get { return this._dimensionTextStyle.Name; }
×
1658
                        set
1659
                        {
132✔
1660
                                if (this.Document != null)
132!
1661
                                {
×
1662
                                        this._dimensionTextStyle = this.Document.TextStyles[value];
×
1663
                                }
×
1664
                                else
1665
                                {
132✔
1666
                                        this._dimensionTextStyle = new TextStyle(value);
132✔
1667
                                }
132✔
1668
                        }
132✔
1669
                }
1670

1671
                /// <summary>
1672
                /// Dimension style name
1673
                /// </summary>
1674
                /// <remarks>
1675
                /// System variable DIMSTYLE
1676
                /// </remarks>
1677
                [CadSystemVariable("$DIMSTYLE", true, 2)]
1678
                public string DimensionStyleOverridesName
1679
                {
1680
                        get { return this._dimensionStyleOverrides.Name; }
6,078✔
1681
                        set
1682
                        {
166✔
1683
                                if (this.Document != null)
166!
1684
                                {
×
1685
                                        this._dimensionStyleOverrides = this.Document.DimensionStyles[value];
×
1686
                                }
×
1687
                                else
1688
                                {
166✔
1689
                                        this._dimensionStyleOverrides = new DimensionStyle(value);
166✔
1690
                                }
166✔
1691
                        }
166✔
1692
                }
1693

1694
                /// <summary>
1695
                /// Number of precision places displayed in angular dimensions
1696
                /// </summary>
1697
                /// <remarks>
1698
                /// System variable DIMADEC
1699
                /// </remarks>
1700
                [CadSystemVariable("$DIMADEC", 70)]
1701
                public short DimensionAngularDimensionDecimalPlaces
1702
                {
1703
                        get { return this.DimensionStyleOverrides.AngularDimensionDecimalPlaces; }
96✔
1704
                        set
1705
                        {
251✔
1706
                                this.DimensionStyleOverrides.AngularDimensionDecimalPlaces = value;
251✔
1707
                        }
251✔
1708
                }
1709

1710
                /// <summary>
1711
                /// Number of decimal places for the tolerance values of a primary units dimension
1712
                /// </summary>
1713
                /// <remarks>
1714
                /// System variable DIMDEC
1715
                /// </remarks>
1716
                [CadSystemVariable("$DIMDEC", 70)]
1717
                public short DimensionDecimalPlaces
1718
                {
1719
                        get { return this.DimensionStyleOverrides.DecimalPlaces; }
96✔
1720
                        set
1721
                        {
251✔
1722
                                this.DimensionStyleOverrides.DecimalPlaces = value;
251✔
1723
                        }
251✔
1724
                }
1725

1726
                /// <summary>
1727
                /// Number of decimal places to display the tolerance values
1728
                /// </summary>
1729
                /// <remarks>
1730
                /// System variable DIMTDEC
1731
                /// </remarks>
1732
                [CadSystemVariable("$DIMTDEC", 70)]
1733
                public short DimensionToleranceDecimalPlaces
1734
                {
1735
                        get { return this.DimensionStyleOverrides.ToleranceDecimalPlaces; }
96✔
1736
                        set
1737
                        {
251✔
1738
                                this.DimensionStyleOverrides.ToleranceDecimalPlaces = value;
251✔
1739
                        }
251✔
1740
                }
1741

1742
                /// <summary>
1743
                /// Alternate unit dimensioning performed if nonzero
1744
                /// </summary>
1745
                /// <remarks>
1746
                /// System variable DIMALT
1747
                /// </remarks>
1748
                [CadSystemVariable("$DIMALT", 70)]
1749
                public bool DimensionAlternateUnitDimensioning
1750
                {
1751
                        get { return this.DimensionStyleOverrides.AlternateUnitDimensioning; }
96✔
1752
                        set
1753
                        {
273✔
1754
                                this.DimensionStyleOverrides.AlternateUnitDimensioning = value;
273✔
1755
                        }
273✔
1756
                }
1757

1758
                /// <summary>
1759
                /// Units format for alternate units of all dimension style family members except angular
1760
                /// </summary>
1761
                /// <remarks>
1762
                /// System variable DIMALTU
1763
                /// </remarks>
1764
                [CadSystemVariable("$DIMALTU", 70)]
1765
                public LinearUnitFormat DimensionAlternateUnitFormat
1766
                {
1767
                        get { return this.DimensionStyleOverrides.AlternateUnitFormat; }
96✔
1768
                        set
1769
                        {
251✔
1770
                                this.DimensionStyleOverrides.AlternateUnitFormat = value;
251✔
1771
                        }
251✔
1772
                }
1773

1774
                /// <summary>
1775
                /// Alternate unit scale factor
1776
                /// </summary>
1777
                /// <remarks>
1778
                /// System variable DIMALTF
1779
                /// </remarks>
1780
                [CadSystemVariable("$DIMALTF", 40)]
1781
                public double DimensionAlternateUnitScaleFactor
1782
                {
1783
                        get { return this.DimensionStyleOverrides.AlternateUnitScaleFactor; }
96✔
1784
                        set
1785
                        {
273✔
1786
                                this.DimensionStyleOverrides.AlternateUnitScaleFactor = value;
273✔
1787
                        }
273✔
1788
                }
1789

1790
                /// <summary>
1791
                /// Extension line offset
1792
                /// </summary>
1793
                /// <remarks>
1794
                /// System variable DIMEXO
1795
                /// </remarks>
1796
                [CadSystemVariable("$DIMEXO", 40)]
1797
                public double DimensionExtensionLineOffset
1798
                {
1799
                        get { return this.DimensionStyleOverrides.ExtensionLineOffset; }
96✔
1800
                        set
1801
                        {
273✔
1802
                                this.DimensionStyleOverrides.ExtensionLineOffset = value;
273✔
1803
                        }
273✔
1804
                }
1805

1806
                /// <summary>
1807
                /// Overall dimensioning scale factor
1808
                /// </summary>
1809
                /// <remarks>
1810
                /// System variable DIMSCALE
1811
                /// </remarks>
1812
                [CadSystemVariable("$DIMSCALE", 40)]
1813
                public double DimensionScaleFactor
1814
                {
1815
                        get { return this.DimensionStyleOverrides.ScaleFactor; }
96✔
1816
                        set
1817
                        {
273✔
1818
                                this.DimensionStyleOverrides.ScaleFactor = value;
273✔
1819
                        }
273✔
1820
                }
1821

1822
                /// <summary>
1823
                /// Alternate unit decimal places
1824
                /// </summary>
1825
                /// <remarks>
1826
                /// System variable DIMALTD
1827
                /// </remarks>
1828
                [CadSystemVariable("$DIMALTD", 70)]
1829
                public short DimensionAlternateUnitDecimalPlaces
1830
                {
1831
                        get { return this.DimensionStyleOverrides.AlternateUnitDecimalPlaces; }
96✔
1832
                        set
1833
                        {
273✔
1834
                                this.DimensionStyleOverrides.AlternateUnitDecimalPlaces = value;
273✔
1835
                        }
273✔
1836
                }
1837

1838
                /// <summary>
1839
                /// Number of decimal places for tolerance values of an alternate units dimension
1840
                /// </summary>
1841
                /// <remarks>
1842
                /// System variable DIMALTTD
1843
                /// </remarks>
1844
                [CadSystemVariable("$DIMALTTD", 70)]
1845
                public short DimensionAlternateUnitToleranceDecimalPlaces
1846
                {
1847
                        get { return this.DimensionStyleOverrides.AlternateUnitToleranceDecimalPlaces; }
96✔
1848
                        set
1849
                        {
251✔
1850
                                this.DimensionStyleOverrides.AlternateUnitToleranceDecimalPlaces = value;
251✔
1851
                        }
251✔
1852
                }
1853

1854
                /// <summary>
1855
                /// Angle format for angular dimensions
1856
                /// </summary>
1857
                /// <remarks>
1858
                /// System variable DIMAUNIT
1859
                /// </remarks>
1860
                [CadSystemVariable("$DIMAUNIT", 70)]
1861
                public AngularUnitFormat DimensionAngularUnit
1862
                {
1863
                        get { return this.DimensionStyleOverrides.AngularUnit; }
81✔
1864
                        set
1865
                        {
233✔
1866
                                this.DimensionStyleOverrides.AngularUnit = value;
233✔
1867
                        }
233✔
1868
                }
1869

1870
                /// <summary>
1871
                /// Undocumented
1872
                /// </summary>
1873
                /// <remarks>
1874
                /// System variable DIMFRAC
1875
                /// </remarks>
1876
                [CadSystemVariable("$DIMFRAC", 70)]
1877
                public FractionFormat DimensionFractionFormat
1878
                {
1879
                        get { return this.DimensionStyleOverrides.FractionFormat; }
81✔
1880
                        set
1881
                        {
233✔
1882
                                this.DimensionStyleOverrides.FractionFormat = value;
233✔
1883
                        }
233✔
1884
                }
1885

1886
                /// <summary>
1887
                /// Sets units for all dimension types except Angular
1888
                /// </summary>
1889
                /// <remarks>
1890
                /// System variable DIMLUNIT
1891
                /// </remarks>
1892
                [CadSystemVariable("$DIMLUNIT", 70)]
1893
                public LinearUnitFormat DimensionLinearUnitFormat
1894
                {
1895
                        get { return this.DimensionStyleOverrides.LinearUnitFormat; }
81✔
1896
                        set
1897
                        {
233✔
1898
                                this.DimensionStyleOverrides.LinearUnitFormat = value;
233✔
1899
                        }
233✔
1900
                }
1901

1902
                /// <summary>
1903
                /// Single-character decimal separator used when creating dimensions whose unit format is decimal
1904
                /// </summary>
1905
                /// <remarks>
1906
                /// System variable DIMLUNIT
1907
                /// </remarks>
1908
                [CadSystemVariable("$DIMDSEP", 70)]
1909
                public char DimensionDecimalSeparator
1910
                {
1911
                        get { return this.DimensionStyleOverrides.DecimalSeparator; }
81✔
1912
                        set
1913
                        {
233✔
1914
                                this.DimensionStyleOverrides.DecimalSeparator = value;
233✔
1915
                        }
233✔
1916
                }
1917

1918
                /// <summary>
1919
                /// Dimension text movement rules decimal
1920
                /// </summary>
1921
                /// <remarks>
1922
                /// System variable DIMTMOVE
1923
                /// </remarks>
1924
                [CadSystemVariable("$DIMTMOVE", 70)]
1925
                public TextMovement DimensionTextMovement
1926
                {
1927
                        get { return this.DimensionStyleOverrides.TextMovement; }
81✔
1928
                        set
1929
                        {
233✔
1930
                                this.DimensionStyleOverrides.TextMovement = value;
233✔
1931
                        }
233✔
1932
                }
1933

1934
                /// <summary>
1935
                /// Horizontal dimension text position
1936
                /// </summary>
1937
                /// <remarks>
1938
                /// System variable DIMJUST
1939
                /// </remarks>
1940
                [CadSystemVariable("$DIMJUST", 70)]
1941
                public DimensionTextHorizontalAlignment DimensionTextHorizontalAlignment
1942
                {
1943
                        get { return this.DimensionStyleOverrides.TextHorizontalAlignment; }
96✔
1944
                        set
1945
                        {
251✔
1946
                                this.DimensionStyleOverrides.TextHorizontalAlignment = value;
251✔
1947
                        }
251✔
1948
                }
1949

1950
                /// <summary>
1951
                /// Suppression of first extension line
1952
                /// </summary>
1953
                /// <remarks>
1954
                /// System variable DIMSD1
1955
                /// </remarks>
1956
                [CadSystemVariable("$DIMSD1", 70)]
1957
                public bool DimensionSuppressFirstDimensionLine
1958
                {
1959
                        get { return this.DimensionStyleOverrides.SuppressFirstDimensionLine; }
15✔
1960
                        set
1961
                        {
150✔
1962
                                this.DimensionStyleOverrides.SuppressFirstDimensionLine = value;
150✔
1963
                        }
150✔
1964
                }
1965

1966
                /// <summary>
1967
                /// Suppression of second extension line
1968
                /// </summary>
1969
                /// <remarks>
1970
                /// System variable DIMSD2
1971
                /// </remarks>
1972
                [CadSystemVariable("$DIMSD2", 70)]
1973
                public bool DimensionSuppressSecondDimensionLine
1974
                {
1975
                        get { return this.DimensionStyleOverrides.SuppressSecondDimensionLine; }
15✔
1976
                        set
1977
                        {
150✔
1978
                                this.DimensionStyleOverrides.SuppressSecondDimensionLine = value;
150✔
1979
                        }
150✔
1980
                }
1981

1982
                /// <summary>
1983
                /// Vertical justification for tolerance values
1984
                /// </summary>
1985
                /// <remarks>
1986
                /// System variable DIMTOL
1987
                /// </remarks>
1988
                [CadSystemVariable("$DIMTOL", 70)]
1989
                public bool DimensionGenerateTolerances
1990
                {
1991
                        get { return this.DimensionStyleOverrides.GenerateTolerances; }
96✔
1992
                        set
1993
                        {
273✔
1994
                                this.DimensionStyleOverrides.GenerateTolerances = value;
273✔
1995
                        }
273✔
1996
                }
1997

1998
                /// <summary>
1999
                /// Vertical justification for tolerance values
2000
                /// </summary>
2001
                /// <remarks>
2002
                /// System variable DIMTOLJ
2003
                /// </remarks>
2004
                [CadSystemVariable("$DIMTOLJ", 70)]
2005
                public ToleranceAlignment DimensionToleranceAlignment
2006
                {
2007
                        get { return this.DimensionStyleOverrides.ToleranceAlignment; }
96✔
2008
                        set
2009
                        {
251✔
2010
                                this.DimensionStyleOverrides.ToleranceAlignment = value;
251✔
2011
                        }
251✔
2012
                }
2013

2014
                /// <summary>
2015
                /// Controls suppression of zeros for primary unit values
2016
                /// </summary>
2017
                /// <remarks>
2018
                /// System variable DIMZIN
2019
                /// </remarks>
2020
                [CadSystemVariable("$DIMZIN", 70)]
2021
                public ZeroHandling DimensionZeroHandling
2022
                {
2023
                        get { return this.DimensionStyleOverrides.ZeroHandling; }
96✔
2024
                        set
2025
                        {
273✔
2026
                                this.DimensionStyleOverrides.ZeroHandling = value;
273✔
2027
                        }
273✔
2028
                }
2029

2030
                /// <summary>
2031
                /// Controls suppression of zeros for tolerance values
2032
                /// </summary>
2033
                /// <remarks>
2034
                /// System variable DIMTZIN
2035
                /// </remarks>
2036
                [CadSystemVariable("$DIMTZIN", 70)]
2037
                public ZeroHandling DimensionToleranceZeroHandling
2038
                {
2039
                        get { return this.DimensionStyleOverrides.ToleranceZeroHandling; }
96✔
2040
                        set
2041
                        {
251✔
2042
                                this.DimensionStyleOverrides.ToleranceZeroHandling = value;
251✔
2043
                        }
251✔
2044
                }
2045

2046
                /// <remarks>
2047
                /// System variable DIMFIT
2048
                /// </remarks>
2049
                [CadSystemVariable("$DIMFIT", 70)]
2050
                public short DimensionFit
2051
                {
2052
                        get { return this.DimensionStyleOverrides.DimensionFit; }
15✔
2053
                        set
2054
                        {
18✔
2055
                                this.DimensionStyleOverrides.DimensionFit = value;
18✔
2056
                        }
18✔
2057
                }
2058

2059
                /// <summary>
2060
                /// Controls suppression of zeros for alternate unit dimension values
2061
                /// </summary>
2062
                /// <remarks>
2063
                /// System variable DIMALTZ
2064
                /// </remarks>
2065
                [CadSystemVariable("$DIMALTZ", 70)]
2066
                public ZeroHandling DimensionAlternateUnitZeroHandling
2067
                {
2068
                        get { return this.DimensionStyleOverrides.AlternateUnitZeroHandling; }
96✔
2069
                        set
2070
                        {
251✔
2071
                                this.DimensionStyleOverrides.AlternateUnitZeroHandling = value;
251✔
2072
                        }
251✔
2073
                }
2074

2075
                /// <summary>
2076
                /// Controls suppression of zeros for alternate tolerance values
2077
                /// </summary>
2078
                /// <remarks>
2079
                /// System variable DIMALTTZ
2080
                /// </remarks>
2081
                [CadSystemVariable("$DIMALTTZ", 70)]
2082
                public ZeroHandling DimensionAlternateUnitToleranceZeroHandling
2083
                {
2084
                        get { return this.DimensionStyleOverrides.AlternateUnitToleranceZeroHandling; }
96✔
2085
                        set
2086
                        {
251✔
2087
                                this.DimensionStyleOverrides.AlternateUnitToleranceZeroHandling = value;
251✔
2088
                        }
251✔
2089
                }
2090

2091
                /// <summary>
2092
                /// Cursor functionality for user-positioned text
2093
                /// </summary>
2094
                /// <remarks>
2095
                /// System variable DIMUPT
2096
                /// </remarks>
2097
                [CadSystemVariable("$DIMUPT", 70)]
2098
                public bool DimensionCursorUpdate
2099
                {
2100
                        get { return this.DimensionStyleOverrides.CursorUpdate; }
96✔
2101
                        set
2102
                        {
251✔
2103
                                this.DimensionStyleOverrides.CursorUpdate = value;
251✔
2104
                        }
251✔
2105
                }
2106

2107
                /// <summary>
2108
                /// Controls dimension text and arrow placement when space is not sufficient to place both within the extension lines
2109
                /// </summary>
2110
                /// <remarks>
2111
                /// System variable DIMATFIT
2112
                /// </remarks>
2113
                [CadSystemVariable("$DIMATFIT", 70)]
2114
                public TextArrowFitType DimensionDimensionTextArrowFit
2115
                {
2116
                        get { return this.DimensionStyleOverrides.DimensionTextArrowFit; }
81✔
2117
                        set
2118
                        {
233✔
2119
                                this.DimensionStyleOverrides.DimensionTextArrowFit = value;
233✔
2120
                        }
233✔
2121
                }
2122

2123
                /// <summary>
2124
                /// Determines rounding of alternate units
2125
                /// </summary>
2126
                /// <remarks>
2127
                /// System variable DIMALTRND
2128
                /// </remarks>
2129
                [CadSystemVariable("$DIMALTRND", 40)]
2130
                public double DimensionAlternateUnitRounding
2131
                {
2132
                        get { return this.DimensionStyleOverrides.AlternateUnitRounding; }
81✔
2133
                        set
2134
                        {
233✔
2135
                                this.DimensionStyleOverrides.AlternateUnitRounding = value;
233✔
2136
                        }
233✔
2137
                }
2138

2139
                /// <summary>
2140
                /// Alternate dimensioning suffix
2141
                /// </summary>
2142
                /// <remarks>
2143
                /// System variable DIMAPOST
2144
                /// </remarks>
2145
                [CadSystemVariable("$DIMAPOST", 1)]
2146
                public string DimensionAlternateDimensioningSuffix
2147
                {
2148
                        get { return this.DimensionStyleOverrides.AlternateDimensioningSuffix; }
96✔
2149
                        set
2150
                        {
273✔
2151
                                this.DimensionStyleOverrides.AlternateDimensioningSuffix = value;
273✔
2152
                        }
273✔
2153
                }
2154

2155
                /// <summary>
2156
                /// Dimensioning arrow size
2157
                /// </summary>
2158
                /// <remarks>
2159
                /// System variable DIMASZ
2160
                /// </remarks>
2161
                [CadSystemVariable("$DIMASZ", 40)]
2162
                public double DimensionArrowSize
2163
                {
2164
                        get { return this.DimensionStyleOverrides.ArrowSize; }
96✔
2165
                        set
2166
                        {
273✔
2167
                                this.DimensionStyleOverrides.ArrowSize = value;
273✔
2168
                        }
273✔
2169
                }
2170

2171
                /// <summary>
2172
                /// Controls suppression of zeros for angular dimensions
2173
                /// </summary>
2174
                /// <remarks>
2175
                /// System variable DIMAZIN
2176
                /// </remarks>
2177
                [CadSystemVariable("$DIMAZIN", 70)]
2178
                public ZeroHandling DimensionAngularZeroHandling
2179
                {
2180
                        get { return this.DimensionStyleOverrides.AngularZeroHandling; }
81✔
2181
                        set
2182
                        {
233✔
2183
                                this.DimensionStyleOverrides.AngularZeroHandling = value;
233✔
2184
                        }
233✔
2185
                }
2186

2187
                /// <summary>
2188
                /// Undocumented
2189
                /// </summary>
2190
                /// <remarks>
2191
                /// System variable DIMARCSYM
2192
                /// </remarks>
2193
                [CadSystemVariable("$DIMARCSYM", 70)]
2194
                public ArcLengthSymbolPosition DimensionArcLengthSymbolPosition
2195
                {
2196
                        get { return this.DimensionStyleOverrides.ArcLengthSymbolPosition; }
51✔
2197
                        set
2198
                        {
156✔
2199
                                this.DimensionStyleOverrides.ArcLengthSymbolPosition = value;
156✔
2200
                        }
156✔
2201
                }
2202

2203
                /// <summary>
2204
                /// Use separate arrow blocks if nonzero
2205
                /// </summary>
2206
                /// <remarks>
2207
                /// System variable DIMSAH
2208
                /// </remarks>
2209
                [CadSystemVariable("$DIMSAH", 70)]
2210
                public bool DimensionSeparateArrowBlocks
2211
                {
2212
                        get { return this.DimensionStyleOverrides.SeparateArrowBlocks; }
96✔
2213
                        set
2214
                        {
273✔
2215
                                this.DimensionStyleOverrides.SeparateArrowBlocks = value;
273✔
2216
                        }
273✔
2217
                }
2218

2219
                /// <summary>
2220
                /// Size of center mark/lines
2221
                /// </summary>
2222
                /// <remarks>
2223
                /// System variable DIMCEN
2224
                /// </remarks>
2225
                [CadSystemVariable("$DIMCEN", 40)]
2226
                public double DimensionCenterMarkSize
2227
                {
2228
                        get { return this.DimensionStyleOverrides.CenterMarkSize; }
96✔
2229
                        set
2230
                        {
273✔
2231
                                this.DimensionStyleOverrides.CenterMarkSize = value;
273✔
2232
                        }
273✔
2233
                }
2234

2235
                /// <summary>
2236
                /// Dimensioning tick size
2237
                /// </summary>
2238
                /// <remarks>
2239
                /// System variable DIMTSZ
2240
                /// </remarks>
2241
                [CadSystemVariable("$DIMTSZ", 40)]
2242
                public double DimensionTickSize
2243
                {
2244
                        get { return this.DimensionStyleOverrides.TickSize; }
96✔
2245
                        set
2246
                        {
273✔
2247
                                this.DimensionStyleOverrides.TickSize = value;
273✔
2248
                        }
273✔
2249
                }
2250

2251
                /// <summary>
2252
                /// Dimension line color
2253
                /// </summary>
2254
                /// <remarks>
2255
                /// System variable DIMCLRD
2256
                /// </remarks>
2257
                [CadSystemVariable("$DIMCLRD", 70)]
2258
                public Color DimensionLineColor
2259
                {
2260
                        get { return this.DimensionStyleOverrides.DimensionLineColor; }
96✔
2261
                        set
2262
                        {
273✔
2263
                                this.DimensionStyleOverrides.DimensionLineColor = value;
273✔
2264
                        }
273✔
2265
                }
2266

2267
                /// <summary>
2268
                /// Dimension extension line color
2269
                /// </summary>
2270
                /// <remarks>
2271
                /// System variable DIMCLRE
2272
                /// </remarks>
2273
                [CadSystemVariable("$DIMCLRE", 70)]
2274
                public Color DimensionExtensionLineColor
2275
                {
2276
                        get { return this.DimensionStyleOverrides.ExtensionLineColor; }
96✔
2277
                        set
2278
                        {
273✔
2279
                                this.DimensionStyleOverrides.ExtensionLineColor = value;
273✔
2280
                        }
273✔
2281
                }
2282

2283
                /// <summary>
2284
                /// Dimension text color
2285
                /// </summary>
2286
                /// <remarks>
2287
                /// System variable DIMCLRT
2288
                /// </remarks>
2289
                [CadSystemVariable("$DIMCLRT", 70)]
2290
                public Color DimensionTextColor
2291
                {
2292
                        get { return this.DimensionStyleOverrides.TextColor; }
96✔
2293
                        set
2294
                        {
273✔
2295
                                this.DimensionStyleOverrides.TextColor = value;
273✔
2296
                        }
273✔
2297
                }
2298

2299
                /// <summary>
2300
                /// Dimension line extension
2301
                /// </summary>
2302
                /// <remarks>
2303
                /// System variable DIMDLE
2304
                /// </remarks>
2305
                [CadSystemVariable("$DIMDLE", 40)]
2306
                public double DimensionLineExtension
2307
                {
2308
                        get { return this.DimensionStyleOverrides.DimensionLineExtension; }
96✔
2309
                        set
2310
                        {
273✔
2311
                                this.DimensionStyleOverrides.DimensionLineExtension = value;
273✔
2312
                        }
273✔
2313
                }
2314

2315
                /// <summary>
2316
                /// Dimension line increment
2317
                /// </summary>
2318
                /// <remarks>
2319
                /// System variable DIMDLI
2320
                /// </remarks>
2321
                [CadSystemVariable("$DIMDLI", 40)]
2322
                public double DimensionLineIncrement
2323
                {
2324
                        get { return this.DimensionStyleOverrides.DimensionLineIncrement; }
96✔
2325
                        set
2326
                        {
273✔
2327
                                this.DimensionStyleOverrides.DimensionLineIncrement = value;
273✔
2328
                        }
273✔
2329
                }
2330

2331
                /// <summary>
2332
                /// Extension line extension
2333
                /// </summary>
2334
                /// <remarks>
2335
                /// System variable DIMEXE
2336
                /// </remarks>
2337
                [CadSystemVariable("$DIMEXE", 40)]
2338
                public double DimensionExtensionLineExtension
2339
                {
2340
                        get { return this.DimensionStyleOverrides.ExtensionLineExtension; }
96✔
2341
                        set
2342
                        {
273✔
2343
                                this.DimensionStyleOverrides.ExtensionLineExtension = value;
273✔
2344
                        }
273✔
2345
                }
2346

2347
                /// <summary>
2348
                /// Undocumented
2349
                /// </summary>
2350
                /// <remarks>
2351
                /// System variable DIMFXLON
2352
                /// </remarks>
2353
                [CadSystemVariable("$DIMFXLON", 70)]
2354
                public bool DimensionIsExtensionLineLengthFixed
2355
                {
2356
                        get { return this.DimensionStyleOverrides.IsExtensionLineLengthFixed; }
51✔
2357
                        set
2358
                        {
156✔
2359
                                this.DimensionStyleOverrides.IsExtensionLineLengthFixed = value;
156✔
2360
                        }
156✔
2361
                }
2362

2363
                /// <summary>
2364
                /// Undocumented
2365
                /// </summary>
2366
                /// <remarks>
2367
                /// System variable DIMFXL
2368
                /// </remarks>
2369
                [CadSystemVariable("$DIMFXL", 40)]
2370
                public double DimensionFixedExtensionLineLength
2371
                {
2372
                        get { return this.DimensionStyleOverrides.FixedExtensionLineLength; }
51✔
2373
                        set
2374
                        {
156✔
2375
                                this.DimensionStyleOverrides.FixedExtensionLineLength = value;
156✔
2376
                        }
156✔
2377
                }
2378

2379
                /// <summary>
2380
                /// Undocumented
2381
                /// </summary>
2382
                /// <remarks>
2383
                /// System variable DIMJOGANG
2384
                /// </remarks>
2385
                [CadSystemVariable("$DIMJOGANG", 40)]
2386
                public double DimensionJoggedRadiusDimensionTransverseSegmentAngle
2387
                {
2388
                        get { return this.DimensionStyleOverrides.JoggedRadiusDimensionTransverseSegmentAngle; }
51✔
2389
                        set
2390
                        {
156✔
2391
                                this.DimensionStyleOverrides.JoggedRadiusDimensionTransverseSegmentAngle = value;
156✔
2392
                        }
156✔
2393
                }
2394

2395
                /// <summary>
2396
                /// Undocumented
2397
                /// </summary>
2398
                /// <remarks>
2399
                /// System variable DIMTFILL
2400
                /// </remarks>
2401
                [CadSystemVariable("$DIMTFILL", 70)]
2402
                public DimensionTextBackgroundFillMode DimensionTextBackgroundFillMode
2403
                {
2404
                        get { return this.DimensionStyleOverrides.TextBackgroundFillMode; }
51✔
2405
                        set
2406
                        {
156✔
2407
                                this.DimensionStyleOverrides.TextBackgroundFillMode = value;
156✔
2408
                        }
156✔
2409
                }
2410

2411
                /// <summary>
2412
                /// Undocumented
2413
                /// </summary>
2414
                /// <remarks>
2415
                /// System variable DIMTFILLCLR
2416
                /// </remarks>
2417
                [CadSystemVariable(DxfReferenceType.Ignored, "$DIMTFILLCLR", 62)]
2418
                public Color DimensionTextBackgroundColor
2419
                {
2420
                        get { return this.DimensionStyleOverrides.TextBackgroundColor; }
51✔
2421
                        set
2422
                        {
156✔
2423
                                this.DimensionStyleOverrides.TextBackgroundColor = value;
156✔
2424
                        }
156✔
2425
                }
2426

2427
                /// <summary>
2428
                /// Undocumented
2429
                /// </summary>
2430
                /// <remarks>
2431
                /// System variable DIMGAP
2432
                /// </remarks>
2433
                [CadSystemVariable("$DIMGAP", 40)]
2434
                public double DimensionLineGap
2435
                {
2436
                        get { return this.DimensionStyleOverrides.DimensionLineGap; }
96✔
2437
                        set
2438
                        {
273✔
2439
                                this.DimensionStyleOverrides.DimensionLineGap = value;
273✔
2440
                        }
273✔
2441
                }
2442

2443
                /// <summary>
2444
                /// Linear measurements scale factor
2445
                /// </summary>
2446
                /// <remarks>
2447
                /// System variable DIMLFAC
2448
                /// </remarks>
2449
                [CadSystemVariable("$DIMLFAC", 40)]
2450
                public double DimensionLinearScaleFactor
2451
                {
2452
                        get { return this.DimensionStyleOverrides.LinearScaleFactor; }
96✔
2453
                        set
2454
                        {
273✔
2455
                                this.DimensionStyleOverrides.LinearScaleFactor = value;
273✔
2456
                        }
273✔
2457
                }
2458

2459
                /// <summary>
2460
                /// Text vertical position
2461
                /// </summary>
2462
                /// <remarks>
2463
                /// System variable DIMTVP
2464
                /// </remarks>
2465
                [CadSystemVariable("$DIMTVP", 40)]
2466
                public double DimensionTextVerticalPosition
2467
                {
2468
                        get { return this.DimensionStyleOverrides.TextVerticalPosition; }
96✔
2469
                        set
2470
                        {
273✔
2471
                                this.DimensionStyleOverrides.TextVerticalPosition = value;
273✔
2472
                        }
273✔
2473
                }
2474

2475
                /// <summary>
2476
                /// Dimension line lineweight
2477
                /// </summary>
2478
                /// <remarks>
2479
                /// System variable DIMLWD
2480
                /// </remarks>
2481
                [CadSystemVariable("$DIMLWD", 70)]
2482
                public LineweightType DimensionLineWeight
2483
                {
2484
                        get { return this.DimensionStyleOverrides.DimensionLineWeight; }
81✔
2485
                        set
2486
                        {
233✔
2487
                                this.DimensionStyleOverrides.DimensionLineWeight = value;
233✔
2488
                        }
233✔
2489
                }
2490

2491
                /// <summary>
2492
                /// Extension line lineweight
2493
                /// </summary>
2494
                /// <remarks>
2495
                /// System variable DIMLWE
2496
                /// </remarks>
2497
                [CadSystemVariable("$DIMLWE", 70)]
2498
                public LineweightType ExtensionLineWeight
2499
                {
2500
                        get { return this.DimensionStyleOverrides.ExtensionLineWeight; }
81✔
2501
                        set
2502
                        {
233✔
2503
                                this.DimensionStyleOverrides.ExtensionLineWeight = value;
233✔
2504
                        }
233✔
2505
                }
2506

2507
                /// <summary>
2508
                /// Undocumented
2509
                /// </summary>
2510
                /// <remarks>
2511
                /// System variable DIMPOST
2512
                /// </remarks>
2513
                [CadSystemVariable("$DIMPOST", 1)]
2514
                public string DimensionPostFix
2515
                {
2516
                        get { return this.DimensionStyleOverrides.PostFix; }
96✔
2517
                        set
2518
                        {
273✔
2519
                                this.DimensionStyleOverrides.PostFix = value;
273✔
2520
                        }
273✔
2521
                }
2522

2523
                /// <summary>
2524
                /// Rounding value for dimension distances
2525
                /// </summary>
2526
                /// <remarks>
2527
                /// System variable DIMRND
2528
                /// </remarks>
2529
                [CadSystemVariable("$DIMRND", 40)]
2530
                public double DimensionRounding
2531
                {
2532
                        get { return this.DimensionStyleOverrides.Rounding; }
96✔
2533
                        set
2534
                        {
273✔
2535
                                this.DimensionStyleOverrides.Rounding = value;
273✔
2536
                        }
273✔
2537
                }
2538

2539
                /// <summary>
2540
                /// First extension line suppressed if nonzero
2541
                /// </summary>
2542
                /// <remarks>
2543
                /// System variable DIMSE1
2544
                /// </remarks>
2545
                [CadSystemVariable("$DIMSE1", 70)]
2546
                public bool DimensionSuppressFirstExtensionLine
2547
                {
2548
                        get { return this.DimensionStyleOverrides.SuppressFirstExtensionLine; }
177✔
2549
                        set
2550
                        {
374✔
2551
                                this.DimensionStyleOverrides.SuppressFirstExtensionLine = value;
374✔
2552
                        }
374✔
2553
                }
2554

2555
                /// <summary>
2556
                /// Second extension line suppressed if nonzero
2557
                /// </summary>
2558
                /// <remarks>
2559
                /// System variable DIMSE2
2560
                /// </remarks>
2561
                [CadSystemVariable("$DIMSE2", 70)]
2562
                public bool DimensionSuppressSecondExtensionLine
2563
                {
2564
                        get { return this.DimensionStyleOverrides.SuppressSecondExtensionLine; }
177✔
2565
                        set
2566
                        {
374✔
2567
                                this.DimensionStyleOverrides.SuppressSecondExtensionLine = value;
374✔
2568
                        }
374✔
2569
                }
2570

2571
                /// <summary>
2572
                /// Suppress outside-extensions dimension lines if nonzero
2573
                /// </summary>
2574
                /// <remarks>
2575
                /// System variable DIMSOXD
2576
                /// </remarks>
2577
                [CadSystemVariable("$DIMSOXD", 70)]
2578
                public bool DimensionSuppressOutsideExtensions
2579
                {
2580
                        get { return this.DimensionStyleOverrides.SuppressOutsideExtensions; }
96✔
2581
                        set
2582
                        {
273✔
2583
                                this.DimensionStyleOverrides.SuppressOutsideExtensions = value;
273✔
2584
                        }
273✔
2585
                }
2586

2587
                /// <summary>
2588
                /// Text above dimension line if nonzero
2589
                /// </summary>
2590
                /// <remarks>
2591
                /// System variable DIMTAD
2592
                /// </remarks>
2593
                [CadSystemVariable("$DIMTAD", 70)]
2594
                public DimensionTextVerticalAlignment DimensionTextVerticalAlignment
2595
                {
2596
                        get { return this.DimensionStyleOverrides.TextVerticalAlignment; }
96✔
2597
                        set
2598
                        {
273✔
2599
                                this.DimensionStyleOverrides.TextVerticalAlignment = value;
273✔
2600
                        }
273✔
2601
                }
2602

2603
                /// <summary>
2604
                /// Controls suppression of zeros for alternate unit dimension values
2605
                /// </summary>
2606
                /// <remarks>
2607
                /// System variable DIMUNIT
2608
                /// </remarks>
2609
                [CadSystemVariable("$DIMUNIT", 70)]
2610
                public short DimensionUnit
2611
                {
2612
                        get { return this.DimensionStyleOverrides.DimensionUnit; }
15✔
2613
                        set
2614
                        {
18✔
2615
                                this.DimensionStyleOverrides.DimensionUnit = value;
18✔
2616
                        }
18✔
2617
                }
2618

2619
                /// <summary>
2620
                /// Dimension tolerance display scale factor
2621
                /// </summary>
2622
                /// <remarks>
2623
                /// System variable DIMTFAC
2624
                /// </remarks>
2625
                [CadSystemVariable("$DIMTFAC", 40)]
2626
                public double DimensionToleranceScaleFactor
2627
                {
2628
                        get { return this.DimensionStyleOverrides.ToleranceScaleFactor; }
96✔
2629
                        set
2630
                        {
273✔
2631
                                this.DimensionStyleOverrides.ToleranceScaleFactor = value;
273✔
2632
                        }
273✔
2633
                }
2634

2635
                /// <summary>
2636
                /// Text inside horizontal if nonzero
2637
                /// </summary>
2638
                /// <remarks>
2639
                /// System variable DIMTIH
2640
                /// </remarks>
2641
                [CadSystemVariable("$DIMTIH", 70)]
2642
                public bool DimensionTextInsideHorizontal
2643
                {
2644
                        get { return this.DimensionStyleOverrides.TextInsideHorizontal; }
96✔
2645
                        set
2646
                        {
273✔
2647
                                this.DimensionStyleOverrides.TextInsideHorizontal = value;
273✔
2648
                        }
273✔
2649
                }
2650

2651
                /// <summary>
2652
                /// Force text inside extensions if nonzero
2653
                /// </summary>
2654
                /// <remarks>
2655
                /// System variable DIMTIX
2656
                /// </remarks>
2657
                [CadSystemVariable("$DIMTIX", 70)]
2658
                public bool DimensionTextInsideExtensions
2659
                {
2660
                        get { return this.DimensionStyleOverrides.TextInsideExtensions; }
96✔
2661
                        set
2662
                        {
273✔
2663
                                this.DimensionStyleOverrides.TextInsideExtensions = value;
273✔
2664
                        }
273✔
2665
                }
2666

2667
                /// <summary>
2668
                /// Minus tolerance
2669
                /// </summary>
2670
                /// <remarks>
2671
                /// System variable DIMTM
2672
                /// </remarks>
2673
                [CadSystemVariable("$DIMTM", 40)]
2674
                public double DimensionMinusTolerance
2675
                {
2676
                        get { return this.DimensionStyleOverrides.MinusTolerance; }
96✔
2677
                        set
2678
                        {
273✔
2679
                                this.DimensionStyleOverrides.MinusTolerance = value;
273✔
2680
                        }
273✔
2681
                }
2682

2683
                /// <summary>
2684
                /// If text is outside the extension lines, dimension lines are forced between the extension lines if nonzero
2685
                /// </summary>
2686
                /// <remarks>
2687
                /// System variable DIMTOFL
2688
                /// </remarks>
2689
                [CadSystemVariable("$DIMTOFL", 70)]
2690
                public bool DimensionTextOutsideExtensions
2691
                {
2692
                        get { return this.DimensionStyleOverrides.TextOutsideExtensions; }
96✔
2693
                        set
2694
                        {
273✔
2695
                                this.DimensionStyleOverrides.TextOutsideExtensions = value;
273✔
2696
                        }
273✔
2697
                }
2698

2699
                /// <summary>
2700
                /// Text outside horizontal if nonzero
2701
                /// </summary>
2702
                /// <remarks>
2703
                /// System variable DIMTOH
2704
                /// </remarks>
2705
                [CadSystemVariable("$DIMTOH", 70)]
2706
                public bool DimensionTextOutsideHorizontal
2707
                {
2708
                        get { return this.DimensionStyleOverrides.TextOutsideHorizontal; }
96✔
2709
                        set
2710
                        {
273✔
2711
                                this.DimensionStyleOverrides.TextOutsideHorizontal = value;
273✔
2712
                        }
273✔
2713
                }
2714

2715
                /// <summary>
2716
                /// Dimension limits generated if nonzero
2717
                /// </summary>
2718
                /// <remarks>
2719
                /// System variable DIMLIM
2720
                /// </remarks>
2721
                [CadSystemVariable("$DIMLIM", 70)]
2722
                public bool DimensionLimitsGeneration
2723
                {
2724
                        get { return this.DimensionStyleOverrides.LimitsGeneration; }
96✔
2725
                        set
2726
                        {
273✔
2727
                                this.DimensionStyleOverrides.LimitsGeneration = value;
273✔
2728
                        }
273✔
2729
                }
2730

2731
                /// <summary>
2732
                /// Plus tolerance
2733
                /// </summary>
2734
                /// <remarks>
2735
                /// System variable DIMTP
2736
                /// </remarks>
2737
                [CadSystemVariable("$DIMTP", 40)]
2738
                public double DimensionPlusTolerance
2739
                {
2740
                        get { return this.DimensionStyleOverrides.PlusTolerance; }
96✔
2741
                        set
2742
                        {
273✔
2743
                                this.DimensionStyleOverrides.PlusTolerance = value;
273✔
2744
                        }
273✔
2745
                }
2746

2747
                /// <summary>
2748
                /// Dimensioning text height
2749
                /// </summary>
2750
                /// <remarks>
2751
                /// System variable DIMTXT
2752
                /// </remarks>
2753
                [CadSystemVariable("$DIMTXT", 40)]
2754
                public double DimensionTextHeight
2755
                {
2756
                        get { return this.DimensionStyleOverrides.TextHeight; }
96✔
2757
                        set
2758
                        {
273✔
2759
                                this.DimensionStyleOverrides.TextHeight = value;
273✔
2760
                        }
273✔
2761
                }
2762

2763
                /// <summary>
2764
                /// Undocumented
2765
                /// </summary>
2766
                /// <remarks>
2767
                /// System variable DIMTXTDIRECTION
2768
                /// </remarks>
2769
                [CadSystemVariable("$DIMTXTDIRECTION", 70)]
2770
                public TextDirection DimensionTextDirection
2771
                {
2772
                        get { return this.DimensionStyleOverrides.TextDirection; }
48✔
2773
                        set
2774
                        {
120✔
2775
                                this.DimensionStyleOverrides.TextDirection = value;
120✔
2776
                        }
120✔
2777
                }
2778

2779
                /// <summary>
2780
                /// Undocumented
2781
                /// </summary>
2782
                /// <remarks>
2783
                /// System variable DIMALTMZF
2784
                /// </remarks>
2785
                [CadSystemVariable("$DIMALTMZF", 40)]
2786
                public double DimensionAltMzf
2787
                {
2788
                        get { return this.DimensionStyleOverrides.AltMzf; }
48✔
2789
                        set
2790
                        {
54✔
2791
                                this.DimensionStyleOverrides.AltMzf = value;
54✔
2792
                        }
54✔
2793
                }
2794

2795
                /// <summary>
2796
                /// Undocumented
2797
                /// </summary>
2798
                /// <remarks>
2799
                /// System variable DIMALTMZS
2800
                /// </remarks>
2801
                [CadSystemVariable("$DIMALTMZS", 6)]
2802
                public string DimensionAltMzs
2803
                {
2804
                        get { return this.DimensionStyleOverrides.AltMzs; }
48✔
2805
                        set
2806
                        {
54✔
2807
                                this.DimensionStyleOverrides.AltMzs = value;
54✔
2808
                        }
54✔
2809
                }
2810

2811
                /// <summary>
2812
                /// Undocumented
2813
                /// </summary>
2814
                /// <remarks>
2815
                /// System variable DIMMZF
2816
                /// </remarks>
2817
                [CadSystemVariable("$DIMMZF", 40)]
2818
                public double DimensionMzf
2819
                {
2820
                        get { return this.DimensionStyleOverrides.Mzf; }
48✔
2821
                        set
2822
                        {
54✔
2823
                                this.DimensionStyleOverrides.Mzf = value;
54✔
2824
                        }
54✔
2825
                }
2826

2827
                /// <summary>
2828
                /// Undocumented
2829
                /// </summary>
2830
                /// <remarks>
2831
                /// System variable DIMMZS
2832
                /// </remarks>
2833
                [CadSystemVariable("$DIMMZS", 6)]
2834
                public string DimensionMzs
2835
                {
2836
                        get { return this.DimensionStyleOverrides.Mzs; }
48✔
2837
                        set
2838
                        {
54✔
2839
                                this.DimensionStyleOverrides.Mzs = value;
54✔
2840
                        }
54✔
2841
                }
2842

2843
                /// <summary>
2844
                /// Undocumented
2845
                /// </summary>
2846
                /// <remarks>
2847
                /// System variable DIMLTYPE
2848
                /// </remarks>
2849
                [CadSystemVariable("$DIMLTYPE", 6)]
2850
                public string DimensionLineType { get; set; } = "ByBlock";
568✔
2851

2852
                /// <summary>
2853
                /// Undocumented
2854
                /// </summary>
2855
                /// <remarks>
2856
                /// System variable DIMLTEX1
2857
                /// </remarks>
2858
                [CadSystemVariable("$DIMLTEX1", 6)]
2859
                public string DimensionTex1 { get; set; } = "ByBlock";
568✔
2860

2861
                /// <summary>
2862
                /// Undocumented
2863
                /// </summary>
2864
                /// <remarks>
2865
                /// System variable DIMLTEX2
2866
                /// </remarks>
2867
                [CadSystemVariable("$DIMLTEX2", 6)]
2868
                public string DimensionTex2 { get; set; } = "ByBlock";
568✔
2869

2870
                public Layer CurrentLayer
2871
                {
2872
                        get
2873
                        {
42✔
2874
                                if (this.Document == null)
42✔
2875
                                {
7✔
2876
                                        return this._currentLayer;
7✔
2877
                                }
2878
                                else
2879
                                {
35✔
2880
                                        return this.Document.Layers[this.CurrentLayerName];
35✔
2881
                                }
2882
                        }
42✔
2883
                        private set
2884
                        {
×
2885
                                this._currentLayer = value;
×
2886
                        }
×
2887
                }
2888

2889
                public LineType CurrentLineType
2890
                {
2891
                        get
2892
                        {
32✔
2893
                                if (this.Document == null)
32✔
2894
                                {
2✔
2895
                                        return this._currentLineType;
2✔
2896
                                }
2897
                                else
2898
                                {
30✔
2899
                                        return this.Document.LineTypes[this.CurrentLineTypeName];
30✔
2900
                                }
2901
                        }
32✔
2902
                        private set
2903
                        {
×
2904
                                _currentLineType = value;
×
2905
                        }
×
2906
                }
2907

2908
                public TextStyle CurrentTextStyle
2909
                {
2910
                        get
2911
                        {
37✔
2912
                                if (this.Document == null)
37✔
2913
                                {
2✔
2914
                                        return this._currentTextStyle;
2✔
2915
                                }
2916
                                else
2917
                                {
35✔
2918
                                        return this.Document.TextStyles[this.TextStyleName];
35✔
2919
                                }
2920
                        }
37✔
2921
                        private set
2922
                        {
×
2923
                                this._currentTextStyle = value;
×
2924
                        }
×
2925
                }
2926

2927
                public TextStyle DimensionTextStyle
2928
                {
2929
                        get
2930
                        {
×
2931
                                if (this.Document == null)
×
2932
                                {
×
2933
                                        return this._dimensionTextStyle;
×
2934
                                }
2935
                                else
2936
                                {
×
2937
                                        return this.Document.TextStyles[this.DimensionTextStyleName];
×
2938
                                }
2939
                        }
×
2940
                        private set
2941
                        {
×
2942
                                this._dimensionTextStyle = value;
×
2943
                        }
×
2944
                }
2945

2946
                public DimensionStyle DimensionStyleOverrides
2947
                {
2948
                        get
2949
                        {
18,796✔
2950
                                if (this.Document == null)
18,796✔
2951
                                {
16,860✔
2952
                                        return this._dimensionStyleOverrides;
16,860✔
2953
                                }
2954
                                else
2955
                                {
1,936✔
2956
                                        return this.Document.DimensionStyles[this.DimensionStyleOverridesName];
1,936✔
2957
                                }
2958
                        }
18,796✔
2959
                        private set
2960
                        {
×
2961
                                this._dimensionStyleOverrides = value;
×
2962
                        }
×
2963
                }
2964

2965
                public MLineStyle CurrentMLineStyle
2966
                {
2967
                        get
NEW
2968
                        {
×
NEW
2969
                                if (this.Document == null)
×
NEW
2970
                                {
×
NEW
2971
                                        return this._currentMLineStyle;
×
2972
                                }
2973
                                else
NEW
2974
                                {
×
NEW
2975
                                        return this.Document.MLineStyles[this.MultiLineStyleName];
×
2976
                                }
NEW
2977
                        }
×
2978
                        private set
NEW
2979
                        {
×
NEW
2980
                                this._currentMLineStyle = value;
×
NEW
2981
                        }
×
2982
                }
2983

2984
                //TODO: How header UCS work??
2985
                public UCS ModelSpaceUcs { get; private set; } = new UCS();
1,732✔
2986

2987
                public UCS ModelSpaceUcsBase { get; private set; } = new UCS();
480✔
2988

2989
                public UCS PaperSpaceUcs { get; private set; } = new UCS();
1,732✔
2990

2991
                public UCS PaperSpaceUcsBase { get; private set; } = new UCS();
480✔
2992

2993
                /// <summary>
2994
                /// Document where this header resides
2995
                /// </summary>
2996
                public CadDocument Document { get; internal set; }
22,061✔
2997

2998
                private readonly static PropertyExpression<CadHeader, CadSystemVariableAttribute> _propertyCache;
2999

3000
                private Layer _currentLayer = Layer.Default;
480✔
3001

3002
                private TextStyle _currentTextStyle = TextStyle.Default;
480✔
3003

3004
                private TextStyle _dimensionTextStyle = TextStyle.Default;
480✔
3005

3006
                private DimensionStyle _dimensionStyleOverrides = DimensionStyle.Default;
480✔
3007

3008
                private LineType _currentLineType = LineType.ByLayer;
480✔
3009

3010
                private MLineStyle _currentMLineStyle = MLineStyle.Default;
480✔
3011

3012
                static CadHeader()
3013
                {
1✔
3014
                        _propertyCache = new PropertyExpression<CadHeader, CadSystemVariableAttribute>(
1✔
3015
                                (info, attribute) => attribute.Name);
233✔
3016
                }
1✔
3017

3018
                public CadHeader() : this(ACadVersion.AC1018) { }
906✔
3019

3020
                public CadHeader(CadDocument document) : this(ACadVersion.AC1018)
178✔
3021
                {
178✔
3022
                        this.Document = document;
178✔
3023
                }
178✔
3024

3025
                public CadHeader(ACadVersion version)
480✔
3026
                {
480✔
3027
                        this.Version = version;
480✔
3028
                }
480✔
3029

3030
                /// <summary>
3031
                /// Gets a map of all the system variables and it's codes
3032
                /// </summary>
3033
                /// <returns></returns>
3034
                public static Dictionary<string, CadSystemVariable> GetHeaderMap()
3035
                {
211✔
3036
                        Dictionary<string, CadSystemVariable> map = new Dictionary<string, CadSystemVariable>();
211✔
3037
                        foreach (PropertyInfo p in typeof(CadHeader).GetProperties())
114,151✔
3038
                        {
56,759✔
3039
                                CadSystemVariableAttribute att = p.GetCustomAttribute<CadSystemVariableAttribute>();
56,759✔
3040
                                if (att == null)
56,759✔
3041
                                        continue;
7,807✔
3042

3043
                                map.Add(att.Name, new CadSystemVariable(p));
48,952✔
3044
                        }
48,952✔
3045

3046
                        return map;
211✔
3047
                }
211✔
3048

3049
                /// <summary>
3050
                /// Set a valueo of a system variable by name
3051
                /// </summary>
3052
                /// <param name="systemvar">name of the system var</param>
3053
                /// <param name="values">parameters for the constructor of the value</param>
3054
                public void SetValue(string systemvar, params object[] values)
3055
                {
31,576✔
3056
                        PropertyExpression<CadHeader, CadSystemVariableAttribute>.Prop prop = _propertyCache.GetProperty(systemvar);
31,576✔
3057

3058
                        ConstructorInfo constr = prop.Property.PropertyType.GetConstructor(values.Select(o => o.GetType()).ToArray());
70,612✔
3059

3060
                        if (prop.Property.PropertyType.IsEnum)
31,576✔
3061
                        {
4,650✔
3062
                                int v = Convert.ToInt32(values.First());
4,650✔
3063
                                prop.Setter(this, Enum.ToObject(prop.Property.PropertyType, v));
4,650✔
3064
                        }
4,650✔
3065
                        else if (prop.Property.PropertyType.IsEquivalentTo(typeof(DateTime)))
26,926✔
3066
                        {
620✔
3067
                                double jvalue = (double)values.First();
620✔
3068

3069
                                prop.Setter(this, CadUtils.FromJulianCalendar((double)values.First()));
620✔
3070
                        }
620✔
3071
                        else if (prop.Property.PropertyType.IsEquivalentTo(typeof(TimeSpan)))
26,306✔
3072
                        {
320✔
3073
                                double jvalue = (double)values.First();
320✔
3074

3075
                                prop.Setter(this, CadUtils.EditingTime((double)values.First()));
320✔
3076
                        }
320✔
3077
                        else if (constr == null)
25,986✔
3078
                        {
21,144✔
3079
                                if (prop.Attribute.IsName && values.First() is string name)
21,144✔
3080
                                {
1,512✔
3081
                                        if (!name.IsNullOrEmpty())
1,512✔
3082
                                        {
940✔
3083
                                                prop.Setter(this, Convert.ChangeType(values.First(), prop.Property.PropertyType));
940✔
3084
                                        }
940✔
3085
                                }
1,512✔
3086
                                else
3087
                                {
19,632✔
3088
                                        prop.Setter(this, Convert.ChangeType(values.First(), prop.Property.PropertyType));
19,632✔
3089
                                }
19,632✔
3090
                        }
21,144✔
3091
                        else
3092
                        {
4,842✔
3093
                                prop.Setter(this, Activator.CreateInstance(prop.Property.PropertyType, values));
4,842✔
3094
                        }
4,842✔
3095
                }
31,576✔
3096

3097
                public object GetValue(string systemvar)
3098
                {
×
3099
                        var prop = _propertyCache.GetProperty(systemvar);
×
3100
                        return prop.Getter(this);
×
3101
                }
×
3102

3103
                /// <summary>
3104
                /// Get the primitive values in each dxf code
3105
                /// </summary>
3106
                /// <param name="systemvar"></param>
3107
                /// <returns>dictionary with the codes and values</returns>
3108
                public Dictionary<DxfCode, object> GetValues(string systemvar)
3109
                {
×
3110
                        Dictionary<DxfCode, object> value = null;
×
3111

3112
                        foreach (PropertyInfo p in this.GetType().GetProperties())
×
3113
                        {
×
3114
                                CadSystemVariableAttribute att = p.GetCustomAttribute<CadSystemVariableAttribute>();
×
3115
                                if (att == null)
×
3116
                                        continue;
×
3117

3118
                                if (att.Name == systemvar)
×
3119
                                {
×
3120
                                        value = new Dictionary<DxfCode, object>();
×
3121

3122
                                        if (att.ValueCodes.Length == 1)
×
3123
                                        {
×
3124
                                                value.Add(att.ValueCodes[0], p.GetValue(this));
×
3125
                                        }
×
3126
                                        else
3127
                                        {
×
3128
                                                IVector vector = (IVector)p.GetValue(this);
×
3129
                                                for (int i = 0; i < vector.Dimension; i++)
×
3130
                                                {
×
3131
                                                        value.Add(att.ValueCodes[i], vector[i]);
×
3132
                                                }
×
3133
                                        }
×
3134

3135
                                        break;
×
3136
                                }
3137
                        }
×
3138

3139
                        return value;
×
3140
                }
×
3141
        }
3142
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc