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

DomCR / ACadSharp / 17737836230

15 Sep 2025 03:12PM UTC coverage: 2.092% (-76.2%) from 78.245%
17737836230

push

github

web-flow
Merge pull request #790 from DomCR/addflag-refactor

addflag refactor

141 of 9225 branches covered (1.53%)

Branch coverage included in aggregate %.

0 of 93 new or added lines in 10 files covered. (0.0%)

24910 existing lines in 372 files now uncovered.

724 of 32119 relevant lines covered (2.25%)

5.76 hits per line

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

0.0
/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
                /// Sets the zero (0) base angle with respect to the current UCS.
19
                /// </summary>
20
                /// <remarks>
21
                /// System variable ANGBASE
22
                /// </remarks>
23
                [CadSystemVariable("$ANGBASE", 50)]
UNCOV
24
                public double AngleBase { get; set; } = 0.0d;
×
25

26
                /// <summary>
27
                /// Sets the direction of positive angles.
28
                /// </summary>
29
                /// <remarks>
30
                /// System variable ANGDIR.
31
                /// </remarks>
32
                [CadSystemVariable("$ANGDIR", 70)]
UNCOV
33
                public AngularDirection AngularDirection { get; set; } = AngularDirection.ClockWise;
×
34

35
                /// <summary>
36
                /// Sets units for angles.
37
                /// </summary>
38
                /// <remarks>
39
                /// System variable AUNITS.
40
                /// </remarks>
41
                [CadSystemVariable("$AUNITS", 70)]
UNCOV
42
                public AngularUnitFormat AngularUnit { get; set; } = AngularUnitFormat.DecimalDegrees;
×
43

44
                /// <summary>
45
                /// Sets the display precision for angular units and coordinates.
46
                /// </summary>
47
                /// <remarks>
48
                /// System variable AUPREC.
49
                /// </remarks>
50
                [CadSystemVariable("$AUPREC", 70)]
51
                public short AngularUnitPrecision
52
                {
53
                        get
UNCOV
54
                        {
×
UNCOV
55
                                return this._angularUnitPrecision;
×
UNCOV
56
                        }
×
57
                        set
UNCOV
58
                        {
×
UNCOV
59
                                ObjectExtensions.InRange(value, 0, 8, "AUPREC valid values are from 0 to 8");
×
UNCOV
60
                                this._angularUnitPrecision = value;
×
UNCOV
61
                        }
×
62
                }
63

64
                /// <summary>
65
                /// Arrow block name for leaders
66
                /// </summary>
67
                /// <remarks>
68
                /// System variable DIMLDRBLK
69
                /// </remarks>
70
                [CadSystemVariable("$DIMLDRBLK", 1)]
UNCOV
71
                public string ArrowBlockName { get; set; } = string.Empty;
×
72

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

82
                /// <summary>
83
                /// Controls display of attributes.
84
                /// </summary>
85
                /// <remarks>
86
                /// System variable ATTMODE.
87
                /// </remarks>
88
                [CadSystemVariable("$ATTMODE", 70)]
UNCOV
89
                public AttributeVisibilityMode AttributeVisibility { get; set; } = AttributeVisibilityMode.Normal;
×
90

91
                /// <summary>
92
                /// System variable BLIPMODE        ??
93
                /// </summary>
94
                [CadSystemVariable("$BLIPMODE", 70)]
UNCOV
95
                public bool BlipMode { get; set; }
×
96

97
                /// <remarks>
98
                /// System variable CAMERADISPLAY
99
                /// </remarks>
100
                [CadSystemVariable("$CAMERADISPLAY", 290)]
UNCOV
101
                public bool CameraDisplayObjects { get; set; }
×
102

103
                /// <remarks>
104
                /// System variable CAMERAHEIGHT
105
                /// </remarks>
106
                [CadSystemVariable("$CAMERAHEIGHT", 40)]
UNCOV
107
                public double CameraHeight { get; set; }
×
108

109
                /// <summary>
110
                /// Sets the chamfer angle when CHAMMODE is set to 1.
111
                /// </summary>
112
                /// <remarks>
113
                /// System variable CHAMFERD.
114
                /// </remarks>
115
                [CadSystemVariable("$CHAMFERD", 40)]
UNCOV
116
                public double ChamferAngle { get; set; } = 0.0d;
×
117

118
                /// <summary>
119
                /// Sets the first chamfer distance when CHAMMODE is set to 0.
120
                /// </summary>
121
                /// <remarks>
122
                /// System variable CHAMFERA.
123
                /// </remarks>
124
                [CadSystemVariable("$CHAMFERA", 40)]
UNCOV
125
                public double ChamferDistance1 { get; set; } = 0.0d;
×
126

127
                /// <summary>
128
                /// Sets the second chamfer distance when CHAMMODE is set to 0.
129
                /// </summary>
130
                /// <remarks>
131
                /// System variable CHAMFERB.
132
                /// </remarks>
133
                [CadSystemVariable("$CHAMFERB", 40)]
UNCOV
134
                public double ChamferDistance2 { get; set; } = 0.0d;
×
135

136
                /// <summary>
137
                /// Sets the chamfer length when CHAMMODE is set to 1.
138
                /// </summary>
139
                /// <remarks>
140
                /// System variable CHAMFERC.
141
                /// </remarks>
142
                [CadSystemVariable("$CHAMFERC", 40)]
UNCOV
143
                public double ChamferLength { get; set; } = 0.0d;
×
144

145
                /// <summary>
146
                /// Drawing code page.
147
                /// </summary>
148
                /// <remarks>
149
                /// System variable DWGCODEPAGE
150
                /// </remarks>
151
                [CadSystemVariable("$DWGCODEPAGE", 3)]
UNCOV
152
                public string CodePage { get; set; } = "ANSI_1252";
×
153

154
                /// <summary>
155
                /// Local date/time of drawing creation (see Special Handling of Date/Time Variables).
156
                /// </summary>
157
                /// <remarks>
158
                /// System variable TDCREATE.
159
                /// </remarks>
160
                [CadSystemVariable("$TDCREATE", 40)]
UNCOV
161
                public DateTime CreateDateTime { get; set; } = DateTime.Now;
×
162

163
                /// <summary>
164
                /// Controls the ellipse type created with ELLIPSE.
165
                /// </summary>
166
                /// <remarks>
167
                /// System variable PELLIPSE.
168
                /// </remarks>
169
                [CadSystemVariable("$PELLIPSE", 70)]
UNCOV
170
                public bool CreateEllipseAsPolyline { get; set; } = false;
×
171

172
                /// <summary>
173
                /// Current entity color number.
174
                /// </summary>
175
                /// <remarks>
176
                /// System variable CECOLOR.
177
                /// </remarks>
178
                [CadSystemVariable("$CECOLOR", 62)]
UNCOV
179
                public Color CurrentEntityColor { get; set; } = Color.ByLayer;
×
180

181
                /// <summary>
182
                /// Current entity linetype scale.
183
                /// </summary>
184
                /// <remarks>
185
                /// System variable CELTSCALE.
186
                /// </remarks>
187
                [CadSystemVariable("$CELTSCALE", 40)]
UNCOV
188
                public double CurrentEntityLinetypeScale { get; set; } = 1.0d;
×
189

190
                /// <summary>
191
                /// Line weight of new objects
192
                /// </summary>
193
                /// <remarks>
194
                /// System variable CELWEIGHT
195
                /// </remarks>
196
                [CadSystemVariable("$CELWEIGHT", 370)]
UNCOV
197
                public LineWeightType CurrentEntityLineWeight { get; set; } = LineWeightType.ByLayer;
×
198

199
                /// <summary>
200
                /// Plot style type of new objects
201
                /// </summary>
202
                /// <remarks>
203
                /// System variable CEPSNTYPE
204
                /// </remarks>
205
                [CadSystemVariable("$CEPSNTYPE", 380)]
UNCOV
206
                public EntityPlotStyleType CurrentEntityPlotStyle { get; set; }
×
207

208
                /// <summary>
209
                /// Gets the current layer associated with the document. If the document is null, returns the default layer.
210
                /// </summary>
211
                /// <remarks>This property retrieves the layer based on the current layer name from the document's layer
212
                /// collection, if a document is available. If no document is associated, it returns the default layer stored
213
                /// internally.</remarks>
214
                public Layer CurrentLayer
215
                {
216
                        get
UNCOV
217
                        {
×
UNCOV
218
                                if (this.Document == null)
×
UNCOV
219
                                {
×
UNCOV
220
                                        return this._currentLayer;
×
221
                                }
222
                                else
UNCOV
223
                                {
×
UNCOV
224
                                        return this.Document.Layers[this.CurrentLayerName];
×
225
                                }
UNCOV
226
                        }
×
227
                        private set
228
                        {
×
229
                                this._currentLayer = value;
×
230
                        }
×
231
                }
232

233
                /// <summary>
234
                /// Sets the current layer.
235
                /// </summary>
236
                /// <remarks>
237
                /// System variable CLAYER
238
                /// </remarks>
239
                [CadSystemVariable("$CLAYER", true, 8)]
240
                public string CurrentLayerName
241
                {
UNCOV
242
                        get { return this._currentLayer.Name; }
×
243
                        set
UNCOV
244
                        {
×
UNCOV
245
                                if (this.Document != null)
×
UNCOV
246
                                {
×
UNCOV
247
                                        this._currentLayer = this.Document.Layers[value];
×
UNCOV
248
                                }
×
249
                                else
UNCOV
250
                                {
×
UNCOV
251
                                        this._currentLayer = new Layer(value);
×
UNCOV
252
                                }
×
UNCOV
253
                        }
×
254
                }
255

256
                /// <summary>
257
                /// Gets the current line type associated with the document or the default line type if no document is set.
258
                /// </summary>
259
                public LineType CurrentLineType
260
                {
261
                        get
UNCOV
262
                        {
×
UNCOV
263
                                if (this.Document == null)
×
264
                                {
×
265
                                        return this._currentLineType;
×
266
                                }
267
                                else
UNCOV
268
                                {
×
UNCOV
269
                                        return this.Document.LineTypes[this.CurrentLineTypeName];
×
270
                                }
UNCOV
271
                        }
×
272
                        private set
273
                        {
×
274
                                _currentLineType = value;
×
275
                        }
×
276
                }
277

278
                /// <summary>
279
                /// Sets the linetype of new objects.
280
                /// </summary>
281
                /// <remarks>
282
                /// System variable CELTYPE.
283
                /// </remarks>
284
                [CadSystemVariable("$CELTYPE", true, 6)]
285
                public string CurrentLineTypeName
286
                {
UNCOV
287
                        get { return this._currentLineType.Name; }
×
288
                        set
UNCOV
289
                        {
×
UNCOV
290
                                if (this.Document != null)
×
UNCOV
291
                                {
×
UNCOV
292
                                        this._currentLineType = this.Document.LineTypes[value];
×
UNCOV
293
                                }
×
294
                                else
UNCOV
295
                                {
×
UNCOV
296
                                        this._currentLineType = new LineType(value);
×
UNCOV
297
                                }
×
UNCOV
298
                        }
×
299
                }
300

301
                public MLineStyle CurrentMLineStyle
302
                {
303
                        get
UNCOV
304
                        {
×
UNCOV
305
                                if (this.Document == null)
×
306
                                {
×
307
                                        return this._currentMLineStyle;
×
308
                                }
309
                                else
UNCOV
310
                                {
×
UNCOV
311
                                        return this.Document.MLineStyles[this.CurrentMLineStyleName];
×
312
                                }
UNCOV
313
                        }
×
314
                        private set
315
                        {
×
316
                                this._currentMLineStyle = value;
×
317
                        }
×
318
                }
319

320
                /// <summary>
321
                /// Current multi line justification.
322
                /// </summary>
323
                /// <remarks>
324
                /// System variable CMLJUST.
325
                /// </remarks>
326
                [CadSystemVariable("$CMLJUST", 70)]
UNCOV
327
                public VerticalAlignmentType CurrentMultiLineJustification { get; set; } = VerticalAlignmentType.Top;
×
328

329
                /// <summary>
330
                /// Current multiline scale.
331
                /// </summary>
332
                /// <remarks>
333
                /// System variable CMLSCALE.
334
                /// </remarks>
335
                [CadSystemVariable("$CMLSCALE", 40)]
UNCOV
336
                public double CurrentMultilineScale { get; set; } = 20.0d;
×
337

338
                /// <summary>
339
                /// Current multiline style name.
340
                /// </summary>
341
                /// <remarks>
342
                /// System variable CMLSTYLE.
343
                /// </remarks>
344
                [CadSystemVariable("$CMLSTYLE", true, 2)]
345
                public string CurrentMLineStyleName
346
                {
UNCOV
347
                        get { return this._currentMLineStyle.Name; }
×
348
                        set
UNCOV
349
                        {
×
UNCOV
350
                                if (this.Document != null)
×
UNCOV
351
                                {
×
UNCOV
352
                                        this._currentMLineStyle = this.Document.MLineStyles[value];
×
UNCOV
353
                                }
×
354
                                else
UNCOV
355
                                {
×
UNCOV
356
                                        this._currentMLineStyle = new MLineStyle(value);
×
UNCOV
357
                                }
×
UNCOV
358
                        }
×
359
                }
360

361
                /// <summary>
362
                /// Gets the current text style applied to the document or the default text style if no document is loaded.
363
                /// </summary>
364
                public TextStyle CurrentTextStyle
365
                {
366
                        get
UNCOV
367
                        {
×
UNCOV
368
                                if (this.Document == null)
×
369
                                {
×
370
                                        return this._currentTextStyle;
×
371
                                }
372
                                else
UNCOV
373
                                {
×
UNCOV
374
                                        return this.Document.TextStyles[this.CurrentTextStyleName];
×
375
                                }
UNCOV
376
                        }
×
377
                        private set
378
                        {
×
379
                                this._currentTextStyle = value;
×
380
                        }
×
381
                }
382

383
                /// <remarks>
384
                /// System variable DGNFRAME
385
                /// </remarks>
386
                [CadSystemVariable("$DGNFRAME", 280)]
UNCOV
387
                public char DgnUnderlayFramesVisibility { get; set; }
×
388

389
                /// <summary>
390
                /// Alternate dimensioning suffix
391
                /// </summary>
392
                /// <remarks>
393
                /// System variable DIMAPOST
394
                /// </remarks>
395
                [CadSystemVariable("$DIMAPOST", 1)]
396
                public string DimensionAlternateDimensioningSuffix
397
                {
UNCOV
398
                        get { return this._dimensionStyleOverrides.AlternateDimensioningSuffix; }
×
399
                        set
UNCOV
400
                        {
×
UNCOV
401
                                this._dimensionStyleOverrides.AlternateDimensioningSuffix = value;
×
UNCOV
402
                        }
×
403
                }
404

405
                /// <summary>
406
                /// Alternate unit decimal places
407
                /// </summary>
408
                /// <remarks>
409
                /// System variable DIMALTD
410
                /// </remarks>
411
                [CadSystemVariable("$DIMALTD", 70)]
412
                public short DimensionAlternateUnitDecimalPlaces
413
                {
UNCOV
414
                        get { return this._dimensionStyleOverrides.AlternateUnitDecimalPlaces; }
×
415
                        set
UNCOV
416
                        {
×
UNCOV
417
                                this._dimensionStyleOverrides.AlternateUnitDecimalPlaces = value;
×
UNCOV
418
                        }
×
419
                }
420

421
                /// <summary>
422
                /// Alternate unit dimensioning performed if nonzero
423
                /// </summary>
424
                /// <remarks>
425
                /// System variable DIMALT
426
                /// </remarks>
427
                [CadSystemVariable("$DIMALT", 70)]
428
                public bool DimensionAlternateUnitDimensioning
429
                {
UNCOV
430
                        get { return this._dimensionStyleOverrides.AlternateUnitDimensioning; }
×
431
                        set
UNCOV
432
                        {
×
UNCOV
433
                                this._dimensionStyleOverrides.AlternateUnitDimensioning = value;
×
UNCOV
434
                        }
×
435
                }
436

437
                /// <summary>
438
                /// Units format for alternate units of all dimension style family members except angular
439
                /// </summary>
440
                /// <remarks>
441
                /// System variable DIMALTU
442
                /// </remarks>
443
                [CadSystemVariable("$DIMALTU", 70)]
444
                public LinearUnitFormat DimensionAlternateUnitFormat
445
                {
UNCOV
446
                        get { return this._dimensionStyleOverrides.AlternateUnitFormat; }
×
447
                        set
UNCOV
448
                        {
×
UNCOV
449
                                this._dimensionStyleOverrides.AlternateUnitFormat = value;
×
UNCOV
450
                        }
×
451
                }
452

453
                /// <summary>
454
                /// Determines rounding of alternate units
455
                /// </summary>
456
                /// <remarks>
457
                /// System variable DIMALTRND
458
                /// </remarks>
459
                [CadSystemVariable("$DIMALTRND", 40)]
460
                public double DimensionAlternateUnitRounding
461
                {
UNCOV
462
                        get { return this._dimensionStyleOverrides.AlternateUnitRounding; }
×
463
                        set
UNCOV
464
                        {
×
UNCOV
465
                                this._dimensionStyleOverrides.AlternateUnitRounding = value;
×
UNCOV
466
                        }
×
467
                }
468

469
                /// <summary>
470
                /// Alternate unit scale factor
471
                /// </summary>
472
                /// <remarks>
473
                /// System variable DIMALTF
474
                /// </remarks>
475
                [CadSystemVariable("$DIMALTF", 40)]
476
                public double DimensionAlternateUnitScaleFactor
477
                {
UNCOV
478
                        get { return this._dimensionStyleOverrides.AlternateUnitScaleFactor; }
×
479
                        set
UNCOV
480
                        {
×
UNCOV
481
                                this._dimensionStyleOverrides.AlternateUnitScaleFactor = value;
×
UNCOV
482
                        }
×
483
                }
484

485
                /// <summary>
486
                /// Number of decimal places for tolerance values of an alternate units dimension
487
                /// </summary>
488
                /// <remarks>
489
                /// System variable DIMALTTD
490
                /// </remarks>
491
                [CadSystemVariable("$DIMALTTD", 70)]
492
                public short DimensionAlternateUnitToleranceDecimalPlaces
493
                {
UNCOV
494
                        get { return this._dimensionStyleOverrides.AlternateUnitToleranceDecimalPlaces; }
×
495
                        set
UNCOV
496
                        {
×
UNCOV
497
                                this._dimensionStyleOverrides.AlternateUnitToleranceDecimalPlaces = value;
×
UNCOV
498
                        }
×
499
                }
500

501
                /// <summary>
502
                /// Controls suppression of zeros for alternate tolerance values
503
                /// </summary>
504
                /// <remarks>
505
                /// System variable DIMALTTZ
506
                /// </remarks>
507
                [CadSystemVariable("$DIMALTTZ", 70)]
508
                public ZeroHandling DimensionAlternateUnitToleranceZeroHandling
509
                {
UNCOV
510
                        get { return this._dimensionStyleOverrides.AlternateUnitToleranceZeroHandling; }
×
511
                        set
UNCOV
512
                        {
×
UNCOV
513
                                this._dimensionStyleOverrides.AlternateUnitToleranceZeroHandling = value;
×
UNCOV
514
                        }
×
515
                }
516

517
                /// <summary>
518
                /// Controls suppression of zeros for alternate unit dimension values
519
                /// </summary>
520
                /// <remarks>
521
                /// System variable DIMALTZ
522
                /// </remarks>
523
                [CadSystemVariable("$DIMALTZ", 70)]
524
                public ZeroHandling DimensionAlternateUnitZeroHandling
525
                {
UNCOV
526
                        get { return this._dimensionStyleOverrides.AlternateUnitZeroHandling; }
×
527
                        set
UNCOV
528
                        {
×
UNCOV
529
                                this._dimensionStyleOverrides.AlternateUnitZeroHandling = value;
×
UNCOV
530
                        }
×
531
                }
532

533
                /// <summary>
534
                /// Undocumented
535
                /// </summary>
536
                /// <remarks>
537
                /// System variable DIMALTMZF
538
                /// </remarks>
539
                [CadSystemVariable("$DIMALTMZF", 40)]
540
                public double DimensionAltMzf
541
                {
UNCOV
542
                        get { return this._dimensionStyleOverrides.AltMzf; }
×
543
                        set
UNCOV
544
                        {
×
UNCOV
545
                                this._dimensionStyleOverrides.AltMzf = value;
×
UNCOV
546
                        }
×
547
                }
548

549
                /// <summary>
550
                /// Undocumented
551
                /// </summary>
552
                /// <remarks>
553
                /// System variable DIMALTMZS
554
                /// </remarks>
555
                [CadSystemVariable("$DIMALTMZS", 6)]
556
                public string DimensionAltMzs
557
                {
UNCOV
558
                        get { return this._dimensionStyleOverrides.AltMzs; }
×
559
                        set
UNCOV
560
                        {
×
UNCOV
561
                                this._dimensionStyleOverrides.AltMzs = value;
×
UNCOV
562
                        }
×
563
                }
564

565
                /// <summary>
566
                /// Number of precision places displayed in angular dimensions
567
                /// </summary>
568
                /// <remarks>
569
                /// System variable DIMADEC
570
                /// </remarks>
571
                [CadSystemVariable("$DIMADEC", 70)]
572
                public short DimensionAngularDimensionDecimalPlaces
573
                {
UNCOV
574
                        get { return this._dimensionStyleOverrides.AngularDecimalPlaces; }
×
575
                        set
UNCOV
576
                        {
×
UNCOV
577
                                this._dimensionStyleOverrides.AngularDecimalPlaces = value;
×
UNCOV
578
                        }
×
579
                }
580

581
                /// <summary>
582
                /// Angle format for angular dimensions
583
                /// </summary>
584
                /// <remarks>
585
                /// System variable DIMAUNIT
586
                /// </remarks>
587
                [CadSystemVariable("$DIMAUNIT", 70)]
588
                public AngularUnitFormat DimensionAngularUnit
589
                {
UNCOV
590
                        get { return this._dimensionStyleOverrides.AngularUnit; }
×
591
                        set
UNCOV
592
                        {
×
UNCOV
593
                                this._dimensionStyleOverrides.AngularUnit = value;
×
UNCOV
594
                        }
×
595
                }
596

597
                /// <summary>
598
                /// Controls suppression of zeros for angular dimensions
599
                /// </summary>
600
                /// <remarks>
601
                /// System variable DIMAZIN
602
                /// </remarks>
603
                [CadSystemVariable("$DIMAZIN", 70)]
604
                public ZeroHandling DimensionAngularZeroHandling
605
                {
UNCOV
606
                        get { return this._dimensionStyleOverrides.AngularZeroHandling; }
×
607
                        set
UNCOV
608
                        {
×
UNCOV
609
                                this._dimensionStyleOverrides.AngularZeroHandling = value;
×
UNCOV
610
                        }
×
611
                }
612

613
                /// <summary>
614
                /// Undocumented
615
                /// </summary>
616
                /// <remarks>
617
                /// System variable DIMARCSYM
618
                /// </remarks>
619
                [CadSystemVariable("$DIMARCSYM", 70)]
620
                public ArcLengthSymbolPosition DimensionArcLengthSymbolPosition
621
                {
UNCOV
622
                        get { return this._dimensionStyleOverrides.ArcLengthSymbolPosition; }
×
623
                        set
UNCOV
624
                        {
×
UNCOV
625
                                this._dimensionStyleOverrides.ArcLengthSymbolPosition = value;
×
UNCOV
626
                        }
×
627
                }
628

629
                /// <summary>
630
                /// Dimensioning arrow size
631
                /// </summary>
632
                /// <remarks>
633
                /// System variable DIMASZ
634
                /// </remarks>
635
                [CadSystemVariable("$DIMASZ", 40)]
636
                public double DimensionArrowSize
637
                {
UNCOV
638
                        get { return this._dimensionStyleOverrides.ArrowSize; }
×
639
                        set
UNCOV
640
                        {
×
UNCOV
641
                                this._dimensionStyleOverrides.ArrowSize = value;
×
UNCOV
642
                        }
×
643
                }
644

645
                /// <summary>
646
                /// Controls the associativity of dimension objects
647
                /// </summary>
648
                /// <remarks>
649
                /// System variable DIMASSOC
650
                /// </remarks>
651
                [CadSystemVariable("$DIMASSOC", 280)]
UNCOV
652
                public DimensionAssociation DimensionAssociativity { get; set; } = DimensionAssociation.CreateAssociativeDimensions;
×
653

654
                /// <summary>
655
                /// Arrow block name
656
                /// </summary>
657
                /// <remarks>
658
                /// System variable DIMBLK
659
                /// </remarks>
660
                [CadSystemVariable("$DIMBLK", 1)]
UNCOV
661
                public string DimensionBlockName { get; set; } = string.Empty;
×
662

663
                /// <summary>
664
                /// First arrow block name
665
                /// </summary>
666
                /// <remarks>
667
                /// System variable DIMBLK1
668
                /// </remarks>
669
                [CadSystemVariable("$DIMBLK1", 1)]
UNCOV
670
                public string DimensionBlockNameFirst { get; set; }
×
671

672
                /// <summary>
673
                /// Second arrow block name
674
                /// </summary>
675
                /// <remarks>
676
                /// System variable DIMBLK2
677
                /// </remarks>
678
                [CadSystemVariable("$DIMBLK2", 1)]
UNCOV
679
                public string DimensionBlockNameSecond { get; set; }
×
680

681
                /// <summary>
682
                /// Size of center mark/lines
683
                /// </summary>
684
                /// <remarks>
685
                /// System variable DIMCEN
686
                /// </remarks>
687
                [CadSystemVariable("$DIMCEN", 40)]
688
                public double DimensionCenterMarkSize
689
                {
UNCOV
690
                        get { return this._dimensionStyleOverrides.CenterMarkSize; }
×
691
                        set
UNCOV
692
                        {
×
UNCOV
693
                                this._dimensionStyleOverrides.CenterMarkSize = value;
×
UNCOV
694
                        }
×
695
                }
696

697
                /// <summary>
698
                /// Cursor functionality for user-positioned text
699
                /// </summary>
700
                /// <remarks>
701
                /// System variable DIMUPT
702
                /// </remarks>
703
                [CadSystemVariable("$DIMUPT", 70)]
704
                public bool DimensionCursorUpdate
705
                {
UNCOV
706
                        get { return this._dimensionStyleOverrides.CursorUpdate; }
×
707
                        set
UNCOV
708
                        {
×
UNCOV
709
                                this._dimensionStyleOverrides.CursorUpdate = value;
×
UNCOV
710
                        }
×
711
                }
712

713
                /// <summary>
714
                /// Number of decimal places for the tolerance values of a primary units dimension
715
                /// </summary>
716
                /// <remarks>
717
                /// System variable DIMDEC
718
                /// </remarks>
719
                [CadSystemVariable("$DIMDEC", 70)]
720
                public short DimensionDecimalPlaces
721
                {
UNCOV
722
                        get { return this._dimensionStyleOverrides.DecimalPlaces; }
×
723
                        set
UNCOV
724
                        {
×
UNCOV
725
                                this._dimensionStyleOverrides.DecimalPlaces = value;
×
UNCOV
726
                        }
×
727
                }
728

729
                /// <summary>
730
                /// Single-character decimal separator used when creating dimensions whose unit format is decimal
731
                /// </summary>
732
                /// <remarks>
733
                /// System variable DIMLUNIT
734
                /// </remarks>
735
                [CadSystemVariable("$DIMDSEP", 70)]
736
                public char DimensionDecimalSeparator
737
                {
UNCOV
738
                        get { return this._dimensionStyleOverrides.DecimalSeparator; }
×
739
                        set
UNCOV
740
                        {
×
UNCOV
741
                                this._dimensionStyleOverrides.DecimalSeparator = value;
×
UNCOV
742
                        }
×
743
                }
744

745
                /// <summary>
746
                /// Controls dimension text and arrow placement when space is not sufficient to place both within the extension lines
747
                /// </summary>
748
                /// <remarks>
749
                /// System variable DIMATFIT
750
                /// </remarks>
751
                [CadSystemVariable("$DIMATFIT", 70)]
752
                public TextArrowFitType DimensionDimensionTextArrowFit
753
                {
UNCOV
754
                        get { return this._dimensionStyleOverrides.DimensionTextArrowFit; }
×
755
                        set
UNCOV
756
                        {
×
UNCOV
757
                                this._dimensionStyleOverrides.DimensionTextArrowFit = value;
×
UNCOV
758
                        }
×
759
                }
760

761
                /// <summary>
762
                /// Dimension extension line color override.
763
                /// </summary>
764
                /// <remarks>
765
                /// System variable DIMCLRE
766
                /// </remarks>
767
                [CadSystemVariable("$DIMCLRE", 70)]
768
                public Color DimensionExtensionLineColor
769
                {
UNCOV
770
                        get { return this._dimensionStyleOverrides.ExtensionLineColor; }
×
771
                        set
UNCOV
772
                        {
×
UNCOV
773
                                this._dimensionStyleOverrides.ExtensionLineColor = value;
×
UNCOV
774
                        }
×
775
                }
776

777
                /// <summary>
778
                /// Extension line extension override.
779
                /// </summary>
780
                /// <remarks>
781
                /// System variable DIMEXE
782
                /// </remarks>
783
                [CadSystemVariable("$DIMEXE", 40)]
784
                public double DimensionExtensionLineExtension
785
                {
UNCOV
786
                        get { return this._dimensionStyleOverrides.ExtensionLineExtension; }
×
787
                        set
UNCOV
788
                        {
×
UNCOV
789
                                this._dimensionStyleOverrides.ExtensionLineExtension = value;
×
UNCOV
790
                        }
×
791
                }
792

793
                /// <summary>
794
                /// Extension line offset override.
795
                /// </summary>
796
                /// <remarks>
797
                /// System variable DIMEXO
798
                /// </remarks>
799
                [CadSystemVariable("$DIMEXO", 40)]
800
                public double DimensionExtensionLineOffset
801
                {
UNCOV
802
                        get { return this._dimensionStyleOverrides.ExtensionLineOffset; }
×
803
                        set
UNCOV
804
                        {
×
UNCOV
805
                                this._dimensionStyleOverrides.ExtensionLineOffset = value;
×
UNCOV
806
                        }
×
807
                }
808

809
                /// <remarks>
810
                /// System variable DIMFIT
811
                /// </remarks>
812
                [CadSystemVariable("$DIMFIT", 70)]
813
                public short DimensionFit
814
                {
UNCOV
815
                        get { return this._dimensionStyleOverrides.DimensionFit; }
×
816
                        set
UNCOV
817
                        {
×
UNCOV
818
                                this._dimensionStyleOverrides.DimensionFit = value;
×
UNCOV
819
                        }
×
820
                }
821

822
                /// <summary>
823
                /// Undocumented
824
                /// </summary>
825
                /// <remarks>
826
                /// System variable DIMFXL
827
                /// </remarks>
828
                [CadSystemVariable("$DIMFXL", 40)]
829
                public double DimensionFixedExtensionLineLength
830
                {
UNCOV
831
                        get { return this._dimensionStyleOverrides.FixedExtensionLineLength; }
×
832
                        set
UNCOV
833
                        {
×
UNCOV
834
                                this._dimensionStyleOverrides.FixedExtensionLineLength = value;
×
UNCOV
835
                        }
×
836
                }
837

838
                /// <summary>
839
                /// Undocumented
840
                /// </summary>
841
                /// <remarks>
842
                /// System variable DIMFRAC
843
                /// </remarks>
844
                [CadSystemVariable("$DIMFRAC", 70)]
845
                public FractionFormat DimensionFractionFormat
846
                {
UNCOV
847
                        get { return this._dimensionStyleOverrides.FractionFormat; }
×
848
                        set
UNCOV
849
                        {
×
UNCOV
850
                                this._dimensionStyleOverrides.FractionFormat = value;
×
UNCOV
851
                        }
×
852
                }
853

854
                /// <summary>
855
                /// Vertical justification for tolerance values override.
856
                /// </summary>
857
                /// <remarks>
858
                /// System variable DIMTOL
859
                /// </remarks>
860
                [CadSystemVariable("$DIMTOL", 70)]
861
                public bool DimensionGenerateTolerances
862
                {
UNCOV
863
                        get { return this._dimensionStyleOverrides.GenerateTolerances; }
×
864
                        set
UNCOV
865
                        {
×
UNCOV
866
                                this._dimensionStyleOverrides.GenerateTolerances = value;
×
UNCOV
867
                        }
×
868
                }
869

870
                /// <summary>
871
                /// Undocumented
872
                /// </summary>
873
                /// <remarks>
874
                /// System variable DIMFXLON
875
                /// </remarks>
876
                [CadSystemVariable("$DIMFXLON", 70)]
877
                public bool DimensionIsExtensionLineLengthFixed
878
                {
UNCOV
879
                        get { return this._dimensionStyleOverrides.IsExtensionLineLengthFixed; }
×
880
                        set
UNCOV
881
                        {
×
UNCOV
882
                                this._dimensionStyleOverrides.IsExtensionLineLengthFixed = value;
×
UNCOV
883
                        }
×
884
                }
885

886
                /// <summary>
887
                /// Undocumented
888
                /// </summary>
889
                /// <remarks>
890
                /// System variable DIMJOGANG
891
                /// </remarks>
892
                [CadSystemVariable("$DIMJOGANG", 40)]
893
                public double DimensionJoggedRadiusDimensionTransverseSegmentAngle
894
                {
UNCOV
895
                        get { return this._dimensionStyleOverrides.JoggedRadiusDimensionTransverseSegmentAngle; }
×
896
                        set
UNCOV
897
                        {
×
UNCOV
898
                                this._dimensionStyleOverrides.JoggedRadiusDimensionTransverseSegmentAngle = value;
×
UNCOV
899
                        }
×
900
                }
901

902
                /// <summary>
903
                /// Dimension limits generated if nonzero override.
904
                /// </summary>
905
                /// <remarks>
906
                /// System variable DIMLIM
907
                /// </remarks>
908
                [CadSystemVariable("$DIMLIM", 70)]
909
                public bool DimensionLimitsGeneration
910
                {
UNCOV
911
                        get { return this._dimensionStyleOverrides.LimitsGeneration; }
×
912
                        set
UNCOV
913
                        {
×
UNCOV
914
                                this._dimensionStyleOverrides.LimitsGeneration = value;
×
UNCOV
915
                        }
×
916
                }
917

918
                /// <summary>
919
                /// Linear measurements scale factor override.
920
                /// </summary>
921
                /// <remarks>
922
                /// System variable DIMLFAC
923
                /// </remarks>
924
                [CadSystemVariable("$DIMLFAC", 40)]
925
                public double DimensionLinearScaleFactor
926
                {
UNCOV
927
                        get { return this._dimensionStyleOverrides.LinearScaleFactor; }
×
928
                        set
UNCOV
929
                        {
×
UNCOV
930
                                this._dimensionStyleOverrides.LinearScaleFactor = value;
×
UNCOV
931
                        }
×
932
                }
933

934
                /// <summary>
935
                /// Sets units for all dimension types except Angular
936
                /// </summary>
937
                /// <remarks>
938
                /// System variable DIMLUNIT
939
                /// </remarks>
940
                [CadSystemVariable("$DIMLUNIT", 70)]
941
                public LinearUnitFormat DimensionLinearUnitFormat
942
                {
UNCOV
943
                        get { return this._dimensionStyleOverrides.LinearUnitFormat; }
×
944
                        set
UNCOV
945
                        {
×
UNCOV
946
                                this._dimensionStyleOverrides.LinearUnitFormat = value;
×
UNCOV
947
                        }
×
948
                }
949

950
                /// <summary>
951
                /// Dimension line color
952
                /// </summary>
953
                /// <remarks>
954
                /// System variable DIMCLRD
955
                /// </remarks>
956
                [CadSystemVariable("$DIMCLRD", 70)]
957
                public Color DimensionLineColor
958
                {
UNCOV
959
                        get { return this._dimensionStyleOverrides.DimensionLineColor; }
×
960
                        set
UNCOV
961
                        {
×
UNCOV
962
                                this._dimensionStyleOverrides.DimensionLineColor = value;
×
UNCOV
963
                        }
×
964
                }
965

966
                /// <summary>
967
                /// Dimension line extension
968
                /// </summary>
969
                /// <remarks>
970
                /// System variable DIMDLE
971
                /// </remarks>
972
                [CadSystemVariable("$DIMDLE", 40)]
973
                public double DimensionLineExtension
974
                {
UNCOV
975
                        get { return this._dimensionStyleOverrides.DimensionLineExtension; }
×
976
                        set
UNCOV
977
                        {
×
UNCOV
978
                                this._dimensionStyleOverrides.DimensionLineExtension = value;
×
UNCOV
979
                        }
×
980
                }
981

982
                /// <summary>
983
                /// Undocumented
984
                /// </summary>
985
                /// <remarks>
986
                /// System variable DIMGAP
987
                /// </remarks>
988
                [CadSystemVariable("$DIMGAP", 40)]
989
                public double DimensionLineGap
990
                {
UNCOV
991
                        get { return this._dimensionStyleOverrides.DimensionLineGap; }
×
992
                        set
UNCOV
993
                        {
×
UNCOV
994
                                this._dimensionStyleOverrides.DimensionLineGap = value;
×
UNCOV
995
                        }
×
996
                }
997

998
                /// <summary>
999
                /// Dimension line increment
1000
                /// </summary>
1001
                /// <remarks>
1002
                /// System variable DIMDLI
1003
                /// </remarks>
1004
                [CadSystemVariable("$DIMDLI", 40)]
1005
                public double DimensionLineIncrement
1006
                {
UNCOV
1007
                        get { return this._dimensionStyleOverrides.DimensionLineIncrement; }
×
1008
                        set
UNCOV
1009
                        {
×
UNCOV
1010
                                this._dimensionStyleOverrides.DimensionLineIncrement = value;
×
UNCOV
1011
                        }
×
1012
                }
1013

1014
                /// <summary>
1015
                /// Undocumented
1016
                /// </summary>
1017
                /// <remarks>
1018
                /// System variable DIMLTYPE
1019
                /// </remarks>
1020
                [CadSystemVariable("$DIMLTYPE", 6)]
UNCOV
1021
                public string DimensionLineType { get; set; } = "ByBlock";
×
1022

1023
                /// <summary>
1024
                /// Dimension line lineweight
1025
                /// </summary>
1026
                /// <remarks>
1027
                /// System variable DIMLWD
1028
                /// </remarks>
1029
                [CadSystemVariable("$DIMLWD", 70)]
1030
                public LineWeightType DimensionLineWeight
1031
                {
UNCOV
1032
                        get { return this._dimensionStyleOverrides.DimensionLineWeight; }
×
1033
                        set
UNCOV
1034
                        {
×
UNCOV
1035
                                this._dimensionStyleOverrides.DimensionLineWeight = value;
×
UNCOV
1036
                        }
×
1037
                }
1038

1039
                /// <summary>
1040
                /// Minus tolerance
1041
                /// </summary>
1042
                /// <remarks>
1043
                /// System variable DIMTM
1044
                /// </remarks>
1045
                [CadSystemVariable("$DIMTM", 40)]
1046
                public double DimensionMinusTolerance
1047
                {
UNCOV
1048
                        get { return this._dimensionStyleOverrides.MinusTolerance; }
×
1049
                        set
UNCOV
1050
                        {
×
UNCOV
1051
                                this._dimensionStyleOverrides.MinusTolerance = value;
×
UNCOV
1052
                        }
×
1053
                }
1054

1055
                /// <summary>
1056
                /// Undocumented
1057
                /// </summary>
1058
                /// <remarks>
1059
                /// System variable DIMMZF
1060
                /// </remarks>
1061
                [CadSystemVariable("$DIMMZF", 40)]
1062
                public double DimensionMzf
1063
                {
UNCOV
1064
                        get { return this._dimensionStyleOverrides.Mzf; }
×
1065
                        set
UNCOV
1066
                        {
×
UNCOV
1067
                                this._dimensionStyleOverrides.Mzf = value;
×
UNCOV
1068
                        }
×
1069
                }
1070

1071
                /// <summary>
1072
                /// Undocumented
1073
                /// </summary>
1074
                /// <remarks>
1075
                /// System variable DIMMZS
1076
                /// </remarks>
1077
                [CadSystemVariable("$DIMMZS", 6)]
1078
                public string DimensionMzs
1079
                {
UNCOV
1080
                        get { return this._dimensionStyleOverrides.Mzs; }
×
1081
                        set
UNCOV
1082
                        {
×
UNCOV
1083
                                this._dimensionStyleOverrides.Mzs = value;
×
UNCOV
1084
                        }
×
1085
                }
1086

1087
                /// <summary>
1088
                /// Plus tolerance
1089
                /// </summary>
1090
                /// <remarks>
1091
                /// System variable DIMTP
1092
                /// </remarks>
1093
                [CadSystemVariable("$DIMTP", 40)]
1094
                public double DimensionPlusTolerance
1095
                {
UNCOV
1096
                        get { return this._dimensionStyleOverrides.PlusTolerance; }
×
1097
                        set
UNCOV
1098
                        {
×
UNCOV
1099
                                this._dimensionStyleOverrides.PlusTolerance = value;
×
UNCOV
1100
                        }
×
1101
                }
1102

1103
                /// <summary>
1104
                /// Undocumented
1105
                /// </summary>
1106
                /// <remarks>
1107
                /// System variable DIMPOST
1108
                /// </remarks>
1109
                [CadSystemVariable("$DIMPOST", 1)]
1110
                public string DimensionPostFix
1111
                {
UNCOV
1112
                        get { return this._dimensionStyleOverrides.PostFix; }
×
1113
                        set
UNCOV
1114
                        {
×
UNCOV
1115
                                this._dimensionStyleOverrides.PostFix = value;
×
UNCOV
1116
                        }
×
1117
                }
1118

1119
                /// <summary>
1120
                /// Rounding value for dimension distances
1121
                /// </summary>
1122
                /// <remarks>
1123
                /// System variable DIMRND
1124
                /// </remarks>
1125
                [CadSystemVariable("$DIMRND", 40)]
1126
                public double DimensionRounding
1127
                {
UNCOV
1128
                        get { return this._dimensionStyleOverrides.Rounding; }
×
1129
                        set
UNCOV
1130
                        {
×
UNCOV
1131
                                this._dimensionStyleOverrides.Rounding = value;
×
UNCOV
1132
                        }
×
1133
                }
1134

1135
                /// <summary>
1136
                /// Overall dimensioning scale factor
1137
                /// </summary>
1138
                /// <remarks>
1139
                /// System variable DIMSCALE
1140
                /// </remarks>
1141
                [CadSystemVariable("$DIMSCALE", 40)]
1142
                public double DimensionScaleFactor
1143
                {
UNCOV
1144
                        get { return this._dimensionStyleOverrides.ScaleFactor; }
×
1145
                        set
UNCOV
1146
                        {
×
UNCOV
1147
                                this._dimensionStyleOverrides.ScaleFactor = value;
×
UNCOV
1148
                        }
×
1149
                }
1150

1151
                /// <summary>
1152
                /// Use separate arrow blocks if nonzero
1153
                /// </summary>
1154
                /// <remarks>
1155
                /// System variable DIMSAH
1156
                /// </remarks>
1157
                [CadSystemVariable("$DIMSAH", 70)]
1158
                public bool DimensionSeparateArrowBlocks
1159
                {
UNCOV
1160
                        get { return this._dimensionStyleOverrides.SeparateArrowBlocks; }
×
1161
                        set
UNCOV
1162
                        {
×
UNCOV
1163
                                this._dimensionStyleOverrides.SeparateArrowBlocks = value;
×
UNCOV
1164
                        }
×
1165
                }
1166

1167
                /// <summary>
1168
                /// Gets the current dimension style applied to the document or the default dimension style if no document is loaded.
1169
                /// </summary>
1170
                public DimensionStyle CurrentDimensionStyle
1171
                {
1172
                        get
UNCOV
1173
                        {
×
UNCOV
1174
                                if (this.Document == null)
×
1175
                                {
×
1176
                                        return this._currentDimensionStyle;
×
1177
                                }
1178
                                else
UNCOV
1179
                                {
×
UNCOV
1180
                                        return this.Document.DimensionStyles[this.CurrentDimensionStyleName];
×
1181
                                }
UNCOV
1182
                        }
×
1183
                        private set
1184
                        {
×
1185
                                this._currentDimensionStyle = value;
×
1186
                        }
×
1187
                }
1188

1189
                /// <summary>
1190
                /// Dimension style name.
1191
                /// </summary>
1192
                /// <remarks>
1193
                /// System variable DIMSTYLE
1194
                /// </remarks>
1195
                [CadSystemVariable("$DIMSTYLE", true, 2)]
1196
                public string CurrentDimensionStyleName
1197
                {
UNCOV
1198
                        get { return this._currentDimensionStyle.Name; }
×
1199
                        set
UNCOV
1200
                        {
×
UNCOV
1201
                                if (this.Document != null)
×
UNCOV
1202
                                {
×
UNCOV
1203
                                        this._currentDimensionStyle = this.Document.DimensionStyles[value];
×
UNCOV
1204
                                }
×
1205
                                else
UNCOV
1206
                                {
×
UNCOV
1207
                                        this._currentDimensionStyle = new DimensionStyle(value);
×
UNCOV
1208
                                }
×
UNCOV
1209
                        }
×
1210
                }
1211

1212
                /// <summary>
1213
                /// Suppression of first extension line.
1214
                /// </summary>
1215
                /// <remarks>
1216
                /// System variable DIMSD1
1217
                /// </remarks>
1218
                [CadSystemVariable("$DIMSD1", 70)]
1219
                public bool DimensionSuppressFirstDimensionLine
1220
                {
UNCOV
1221
                        get { return this._dimensionStyleOverrides.SuppressFirstDimensionLine; }
×
1222
                        set
UNCOV
1223
                        {
×
UNCOV
1224
                                this._dimensionStyleOverrides.SuppressFirstDimensionLine = value;
×
UNCOV
1225
                        }
×
1226
                }
1227

1228
                /// <summary>
1229
                /// First extension line suppressed if nonzero
1230
                /// </summary>
1231
                /// <remarks>
1232
                /// System variable DIMSE1
1233
                /// </remarks>
1234
                [CadSystemVariable("$DIMSE1", 70)]
1235
                public bool DimensionSuppressFirstExtensionLine
1236
                {
UNCOV
1237
                        get { return this._dimensionStyleOverrides.SuppressFirstExtensionLine; }
×
1238
                        set
UNCOV
1239
                        {
×
UNCOV
1240
                                this._dimensionStyleOverrides.SuppressFirstExtensionLine = value;
×
UNCOV
1241
                        }
×
1242
                }
1243

1244
                /// <summary>
1245
                /// Suppress outside-extensions dimension lines if nonzero
1246
                /// </summary>
1247
                /// <remarks>
1248
                /// System variable DIMSOXD
1249
                /// </remarks>
1250
                [CadSystemVariable("$DIMSOXD", 70)]
1251
                public bool DimensionSuppressOutsideExtensions
1252
                {
UNCOV
1253
                        get { return this._dimensionStyleOverrides.SuppressOutsideExtensions; }
×
1254
                        set
UNCOV
1255
                        {
×
UNCOV
1256
                                this._dimensionStyleOverrides.SuppressOutsideExtensions = value;
×
UNCOV
1257
                        }
×
1258
                }
1259

1260
                /// <summary>
1261
                /// Suppression of second extension line
1262
                /// </summary>
1263
                /// <remarks>
1264
                /// System variable DIMSD2
1265
                /// </remarks>
1266
                [CadSystemVariable("$DIMSD2", 70)]
1267
                public bool DimensionSuppressSecondDimensionLine
1268
                {
UNCOV
1269
                        get { return this._dimensionStyleOverrides.SuppressSecondDimensionLine; }
×
1270
                        set
UNCOV
1271
                        {
×
UNCOV
1272
                                this._dimensionStyleOverrides.SuppressSecondDimensionLine = value;
×
UNCOV
1273
                        }
×
1274
                }
1275

1276
                /// <summary>
1277
                /// Second extension line suppressed if nonzero
1278
                /// </summary>
1279
                /// <remarks>
1280
                /// System variable DIMSE2
1281
                /// </remarks>
1282
                [CadSystemVariable("$DIMSE2", 70)]
1283
                public bool DimensionSuppressSecondExtensionLine
1284
                {
UNCOV
1285
                        get { return this._dimensionStyleOverrides.SuppressSecondExtensionLine; }
×
1286
                        set
UNCOV
1287
                        {
×
UNCOV
1288
                                this._dimensionStyleOverrides.SuppressSecondExtensionLine = value;
×
UNCOV
1289
                        }
×
1290
                }
1291

1292
                /// <summary>
1293
                /// Undocumented
1294
                /// </summary>
1295
                /// <remarks>
1296
                /// System variable DIMLTEX1
1297
                /// </remarks>
1298
                [CadSystemVariable("$DIMLTEX1", 6)]
UNCOV
1299
                public string DimensionTex1 { get; set; } = "ByBlock";
×
1300

1301
                /// <summary>
1302
                /// Undocumented
1303
                /// </summary>
1304
                /// <remarks>
1305
                /// System variable DIMLTEX2
1306
                /// </remarks>
1307
                [CadSystemVariable("$DIMLTEX2", 6)]
UNCOV
1308
                public string DimensionTex2 { get; set; } = "ByBlock";
×
1309

1310
                /// <summary>
1311
                /// Undocumented
1312
                /// </summary>
1313
                /// <remarks>
1314
                /// System variable DIMTFILLCLR
1315
                /// </remarks>
1316
                [CadSystemVariable(DxfReferenceType.Ignored, "$DIMTFILLCLR", 62)]
1317
                public Color DimensionTextBackgroundColor
1318
                {
UNCOV
1319
                        get { return this._dimensionStyleOverrides.TextBackgroundColor; }
×
1320
                        set
UNCOV
1321
                        {
×
UNCOV
1322
                                this._dimensionStyleOverrides.TextBackgroundColor = value;
×
UNCOV
1323
                        }
×
1324
                }
1325

1326
                /// <summary>
1327
                /// Undocumented
1328
                /// </summary>
1329
                /// <remarks>
1330
                /// System variable DIMTFILL
1331
                /// </remarks>
1332
                [CadSystemVariable("$DIMTFILL", 70)]
1333
                public DimensionTextBackgroundFillMode DimensionTextBackgroundFillMode
1334
                {
UNCOV
1335
                        get { return this._dimensionStyleOverrides.TextBackgroundFillMode; }
×
1336
                        set
UNCOV
1337
                        {
×
UNCOV
1338
                                this._dimensionStyleOverrides.TextBackgroundFillMode = value;
×
UNCOV
1339
                        }
×
1340
                }
1341

1342
                /// <summary>
1343
                /// Dimension text color
1344
                /// </summary>
1345
                /// <remarks>
1346
                /// System variable DIMCLRT
1347
                /// </remarks>
1348
                [CadSystemVariable("$DIMCLRT", 70)]
1349
                public Color DimensionTextColor
1350
                {
UNCOV
1351
                        get { return this._dimensionStyleOverrides.TextColor; }
×
1352
                        set
UNCOV
1353
                        {
×
UNCOV
1354
                                this._dimensionStyleOverrides.TextColor = value;
×
UNCOV
1355
                        }
×
1356
                }
1357

1358
                /// <summary>
1359
                /// Undocumented
1360
                /// </summary>
1361
                /// <remarks>
1362
                /// System variable DIMTXTDIRECTION
1363
                /// </remarks>
1364
                [CadSystemVariable("$DIMTXTDIRECTION", 70)]
1365
                public TextDirection DimensionTextDirection
1366
                {
UNCOV
1367
                        get { return this._dimensionStyleOverrides.TextDirection; }
×
1368
                        set
UNCOV
1369
                        {
×
UNCOV
1370
                                this._dimensionStyleOverrides.TextDirection = value;
×
UNCOV
1371
                        }
×
1372
                }
1373

1374
                /// <summary>
1375
                /// Dimensioning text height
1376
                /// </summary>
1377
                /// <remarks>
1378
                /// System variable DIMTXT
1379
                /// </remarks>
1380
                [CadSystemVariable("$DIMTXT", 40)]
1381
                public double DimensionTextHeight
1382
                {
UNCOV
1383
                        get { return this._dimensionStyleOverrides.TextHeight; }
×
1384
                        set
UNCOV
1385
                        {
×
UNCOV
1386
                                this._dimensionStyleOverrides.TextHeight = value;
×
UNCOV
1387
                        }
×
1388
                }
1389

1390
                /// <summary>
1391
                /// Horizontal dimension text position
1392
                /// </summary>
1393
                /// <remarks>
1394
                /// System variable DIMJUST
1395
                /// </remarks>
1396
                [CadSystemVariable("$DIMJUST", 70)]
1397
                public DimensionTextHorizontalAlignment DimensionTextHorizontalAlignment
1398
                {
UNCOV
1399
                        get { return this._dimensionStyleOverrides.TextHorizontalAlignment; }
×
1400
                        set
UNCOV
1401
                        {
×
UNCOV
1402
                                this._dimensionStyleOverrides.TextHorizontalAlignment = value;
×
UNCOV
1403
                        }
×
1404
                }
1405

1406
                /// <summary>
1407
                /// Force text inside extensions if nonzero
1408
                /// </summary>
1409
                /// <remarks>
1410
                /// System variable DIMTIX
1411
                /// </remarks>
1412
                [CadSystemVariable("$DIMTIX", 70)]
1413
                public bool DimensionTextInsideExtensions
1414
                {
UNCOV
1415
                        get { return this._dimensionStyleOverrides.TextInsideExtensions; }
×
1416
                        set
UNCOV
1417
                        {
×
UNCOV
1418
                                this._dimensionStyleOverrides.TextInsideExtensions = value;
×
UNCOV
1419
                        }
×
1420
                }
1421

1422
                /// <summary>
1423
                /// Text inside horizontal if nonzero
1424
                /// </summary>
1425
                /// <remarks>
1426
                /// System variable DIMTIH
1427
                /// </remarks>
1428
                [CadSystemVariable("$DIMTIH", 70)]
1429
                public bool DimensionTextInsideHorizontal
1430
                {
UNCOV
1431
                        get { return this._dimensionStyleOverrides.TextInsideHorizontal; }
×
1432
                        set
UNCOV
1433
                        {
×
UNCOV
1434
                                this._dimensionStyleOverrides.TextInsideHorizontal = value;
×
UNCOV
1435
                        }
×
1436
                }
1437

1438
                /// <summary>
1439
                /// Dimension text movement rules decimal
1440
                /// </summary>
1441
                /// <remarks>
1442
                /// System variable DIMTMOVE
1443
                /// </remarks>
1444
                [CadSystemVariable("$DIMTMOVE", 70)]
1445
                public TextMovement DimensionTextMovement
1446
                {
UNCOV
1447
                        get { return this._dimensionStyleOverrides.TextMovement; }
×
1448
                        set
UNCOV
1449
                        {
×
UNCOV
1450
                                this._dimensionStyleOverrides.TextMovement = value;
×
UNCOV
1451
                        }
×
1452
                }
1453

1454
                /// <summary>
1455
                /// If text is outside the extension lines, dimension lines are forced between the extension lines if nonzero
1456
                /// </summary>
1457
                /// <remarks>
1458
                /// System variable DIMTOFL
1459
                /// </remarks>
1460
                [CadSystemVariable("$DIMTOFL", 70)]
1461
                public bool DimensionTextOutsideExtensions
1462
                {
UNCOV
1463
                        get { return this._dimensionStyleOverrides.TextOutsideExtensions; }
×
1464
                        set
UNCOV
1465
                        {
×
UNCOV
1466
                                this._dimensionStyleOverrides.TextOutsideExtensions = value;
×
UNCOV
1467
                        }
×
1468
                }
1469

1470
                /// <summary>
1471
                /// Text outside horizontal if nonzero
1472
                /// </summary>
1473
                /// <remarks>
1474
                /// System variable DIMTOH
1475
                /// </remarks>
1476
                [CadSystemVariable("$DIMTOH", 70)]
1477
                public bool DimensionTextOutsideHorizontal
1478
                {
UNCOV
1479
                        get { return this._dimensionStyleOverrides.TextOutsideHorizontal; }
×
1480
                        set
UNCOV
1481
                        {
×
UNCOV
1482
                                this._dimensionStyleOverrides.TextOutsideHorizontal = value;
×
UNCOV
1483
                        }
×
1484
                }
1485

1486
                /// <summary>
1487
                /// Gets the current dimension text style applied to the document or the default dimension text style if no document is loaded.
1488
                /// </summary>
1489
                public TextStyle DimensionTextStyle
1490
                {
1491
                        get
UNCOV
1492
                        {
×
UNCOV
1493
                                if (this.Document == null)
×
1494
                                {
×
1495
                                        return this._dimensionTextStyle;
×
1496
                                }
1497
                                else
UNCOV
1498
                                {
×
UNCOV
1499
                                        return this.Document.TextStyles[this.DimensionTextStyleName];
×
1500
                                }
UNCOV
1501
                        }
×
1502
                        private set
1503
                        {
×
1504
                                this._dimensionTextStyle = value;
×
1505
                        }
×
1506
                }
1507

1508
                /// <summary>
1509
                /// Dimension text style
1510
                /// </summary>
1511
                /// <remarks>
1512
                /// System variable DIMTXSTY
1513
                /// </remarks>
1514
                [CadSystemVariable("$DIMTXSTY", true, 7)]
1515
                public string DimensionTextStyleName
1516
                {
UNCOV
1517
                        get { return this._dimensionTextStyle.Name; }
×
1518
                        set
UNCOV
1519
                        {
×
UNCOV
1520
                                if (this.Document != null)
×
UNCOV
1521
                                {
×
UNCOV
1522
                                        this._dimensionTextStyle = this.Document.TextStyles[value];
×
UNCOV
1523
                                }
×
1524
                                else
UNCOV
1525
                                {
×
UNCOV
1526
                                        this._dimensionTextStyle = new TextStyle(value);
×
UNCOV
1527
                                }
×
UNCOV
1528
                        }
×
1529
                }
1530

1531
                /// <summary>
1532
                /// Text above dimension line if nonzero
1533
                /// </summary>
1534
                /// <remarks>
1535
                /// System variable DIMTAD
1536
                /// </remarks>
1537
                [CadSystemVariable("$DIMTAD", 70)]
1538
                public DimensionTextVerticalAlignment DimensionTextVerticalAlignment
1539
                {
UNCOV
1540
                        get { return this._dimensionStyleOverrides.TextVerticalAlignment; }
×
1541
                        set
UNCOV
1542
                        {
×
UNCOV
1543
                                this._dimensionStyleOverrides.TextVerticalAlignment = value;
×
UNCOV
1544
                        }
×
1545
                }
1546

1547
                /// <summary>
1548
                /// Text vertical position
1549
                /// </summary>
1550
                /// <remarks>
1551
                /// System variable DIMTVP
1552
                /// </remarks>
1553
                [CadSystemVariable("$DIMTVP", 40)]
1554
                public double DimensionTextVerticalPosition
1555
                {
UNCOV
1556
                        get { return this._dimensionStyleOverrides.TextVerticalPosition; }
×
1557
                        set
UNCOV
1558
                        {
×
UNCOV
1559
                                this._dimensionStyleOverrides.TextVerticalPosition = value;
×
UNCOV
1560
                        }
×
1561
                }
1562

1563
                /// <summary>
1564
                /// Dimensioning tick size
1565
                /// </summary>
1566
                /// <remarks>
1567
                /// System variable DIMTSZ
1568
                /// </remarks>
1569
                [CadSystemVariable("$DIMTSZ", 40)]
1570
                public double DimensionTickSize
1571
                {
UNCOV
1572
                        get { return this._dimensionStyleOverrides.TickSize; }
×
1573
                        set
UNCOV
1574
                        {
×
UNCOV
1575
                                this._dimensionStyleOverrides.TickSize = value;
×
UNCOV
1576
                        }
×
1577
                }
1578

1579
                /// <summary>
1580
                /// Vertical justification for tolerance values
1581
                /// </summary>
1582
                /// <remarks>
1583
                /// System variable DIMTOLJ
1584
                /// </remarks>
1585
                [CadSystemVariable("$DIMTOLJ", 70)]
1586
                public ToleranceAlignment DimensionToleranceAlignment
1587
                {
UNCOV
1588
                        get { return this._dimensionStyleOverrides.ToleranceAlignment; }
×
1589
                        set
UNCOV
1590
                        {
×
UNCOV
1591
                                this._dimensionStyleOverrides.ToleranceAlignment = value;
×
UNCOV
1592
                        }
×
1593
                }
1594

1595
                /// <summary>
1596
                /// Number of decimal places to display the tolerance values
1597
                /// </summary>
1598
                /// <remarks>
1599
                /// System variable DIMTDEC
1600
                /// </remarks>
1601
                [CadSystemVariable("$DIMTDEC", 70)]
1602
                public short DimensionToleranceDecimalPlaces
1603
                {
UNCOV
1604
                        get { return this._dimensionStyleOverrides.ToleranceDecimalPlaces; }
×
1605
                        set
UNCOV
1606
                        {
×
UNCOV
1607
                                this._dimensionStyleOverrides.ToleranceDecimalPlaces = value;
×
UNCOV
1608
                        }
×
1609
                }
1610

1611
                /// <summary>
1612
                /// Dimension tolerance display scale factor
1613
                /// </summary>
1614
                /// <remarks>
1615
                /// System variable DIMTFAC
1616
                /// </remarks>
1617
                [CadSystemVariable("$DIMTFAC", 40)]
1618
                public double DimensionToleranceScaleFactor
1619
                {
UNCOV
1620
                        get { return this._dimensionStyleOverrides.ToleranceScaleFactor; }
×
1621
                        set
UNCOV
1622
                        {
×
UNCOV
1623
                                this._dimensionStyleOverrides.ToleranceScaleFactor = value;
×
UNCOV
1624
                        }
×
1625
                }
1626

1627
                /// <summary>
1628
                /// Controls suppression of zeros for tolerance values
1629
                /// </summary>
1630
                /// <remarks>
1631
                /// System variable DIMTZIN
1632
                /// </remarks>
1633
                [CadSystemVariable("$DIMTZIN", 70)]
1634
                public ZeroHandling DimensionToleranceZeroHandling
1635
                {
UNCOV
1636
                        get { return this._dimensionStyleOverrides.ToleranceZeroHandling; }
×
1637
                        set
UNCOV
1638
                        {
×
UNCOV
1639
                                this._dimensionStyleOverrides.ToleranceZeroHandling = value;
×
UNCOV
1640
                        }
×
1641
                }
1642

1643
                /// <summary>
1644
                /// Controls suppression of zeros for alternate unit dimension values
1645
                /// </summary>
1646
                /// <remarks>
1647
                /// System variable DIMUNIT
1648
                /// </remarks>
1649
                [CadSystemVariable("$DIMUNIT", 70)]
1650
                public short DimensionUnit
1651
                {
UNCOV
1652
                        get { return this._dimensionStyleOverrides.DimensionUnit; }
×
1653
                        set
UNCOV
1654
                        {
×
UNCOV
1655
                                this._dimensionStyleOverrides.DimensionUnit = value;
×
UNCOV
1656
                        }
×
1657
                }
1658

1659
                /// <summary>
1660
                /// Controls suppression of zeros for primary unit values
1661
                /// </summary>
1662
                /// <remarks>
1663
                /// System variable DIMZIN
1664
                /// </remarks>
1665
                [CadSystemVariable("$DIMZIN", 70)]
1666
                public ZeroHandling DimensionZeroHandling
1667
                {
UNCOV
1668
                        get { return this._dimensionStyleOverrides.ZeroHandling; }
×
1669
                        set
UNCOV
1670
                        {
×
UNCOV
1671
                                this._dimensionStyleOverrides.ZeroHandling = value;
×
UNCOV
1672
                        }
×
1673
                }
1674

1675
                /// <summary>
1676
                /// Get the <see cref="DimensionStyle"/> override for this document.
1677
                /// </summary>
1678
                public DimensionStyle DimensionstyleOverrides { get { return this._dimensionStyleOverrides; } }
×
1679

1680
                /// <remarks>
1681
                /// System variable LIGHTGLYPHDISPLAY
1682
                /// </remarks>
1683
                [CadSystemVariable("$LIGHTGLYPHDISPLAY", 280)]
UNCOV
1684
                public char DisplayLightGlyphs { get; set; }
×
1685

1686
                /// <summary>
1687
                /// Controls whether the lineweights of objects are displayed.<br/>
1688
                /// 0 = Lineweight is not displayed<br/>
1689
                /// 1 = Lineweight is displayed
1690
                /// </summary>
1691
                /// <remarks>
1692
                /// System variable LWDISPLAY
1693
                /// </remarks>
1694
                [CadSystemVariable("$LWDISPLAY", 290)]
UNCOV
1695
                public bool DisplayLineWeight { get; set; } = false;
×
1696

1697
                /// <summary>
1698
                /// Controls display of silhouette edges of 3D solid and surface objects in the Wireframe or 2D Wireframe visual styles.
1699
                /// </summary>
1700
                /// <remarks>
1701
                /// System variable DISPSILH.
1702
                /// </remarks>
1703
                [CadSystemVariable("$DISPSILH", 70)]
UNCOV
1704
                public bool DisplaySilhouetteCurves { get; set; } = false;
×
1705

1706
                /// <summary>
1707
                /// Document where this header resides
1708
                /// </summary>
UNCOV
1709
                public CadDocument Document { get; internal set; }
×
1710

1711
                /// <remarks>
1712
                /// System variable LOFTANG1
1713
                /// </remarks>
1714
                [CadSystemVariable("$LOFTANG1", 40)]
UNCOV
1715
                public double DraftAngleFirstCrossSection { get; set; }
×
1716

1717
                /// <remarks>
1718
                /// System variable LOFTANG2
1719
                /// </remarks>
1720
                [CadSystemVariable("$LOFTANG2", 40)]
UNCOV
1721
                public double DraftAngleSecondCrossSection { get; set; }
×
1722

1723
                /// <remarks>
1724
                /// System variable LOFTMAG1
1725
                /// </remarks>
1726
                [CadSystemVariable("$LOFTMAG1", 40)]
UNCOV
1727
                public double DraftMagnitudeFirstCrossSection { get; set; }
×
1728

1729
                /// <remarks>
1730
                /// System variable LOFTMAG2
1731
                /// </remarks>
1732
                [CadSystemVariable("$LOFTMAG2", 40)]
UNCOV
1733
                public double DraftMagnitudeSecondCrossSection { get; set; }
×
1734

1735
                /// <remarks>
1736
                /// System variable 3DDWFPREC
1737
                /// </remarks>
1738
                [CadSystemVariable("$3DDWFPREC", 40)]
UNCOV
1739
                public double Dw3DPrecision { get; set; }
×
1740

1741
                /// <remarks>
1742
                /// System variable DWFFRAME
1743
                /// </remarks>
1744
                [CadSystemVariable("$DWFFRAME", 280)]
UNCOV
1745
                public char DwgUnderlayFramesVisibility { get; set; }
×
1746

1747
                /// <summary>
1748
                /// Current elevation set by ELEV command
1749
                /// </summary>
1750
                /// <remarks>
1751
                /// System variable ELEVATION
1752
                /// </remarks>
1753
                [CadSystemVariable("$ELEVATION", 40)]
1754
                public double Elevation
1755
                {
UNCOV
1756
                        get { return this.ModelSpaceUcs.Elevation; }
×
1757
                        set
UNCOV
1758
                        {
×
UNCOV
1759
                                this.ModelSpaceUcs.Elevation = value;
×
UNCOV
1760
                        }
×
1761
                }
1762

1763
                /// <summary>
1764
                /// Line weight end-caps setting for new objects
1765
                /// </summary>
1766
                /// <remarks>
1767
                /// System variable ENDCAPS
1768
                /// </remarks>
1769
                [CadSystemVariable("$ENDCAPS", 280)]
UNCOV
1770
                public short EndCaps { get; set; }
×
1771

1772
                /// <summary>
1773
                /// Controls the object sorting methods
1774
                /// </summary>
1775
                /// <remarks>
1776
                /// System variable SORTENTS
1777
                /// </remarks>
1778
                [CadSystemVariable("$SORTENTS", 280)]
UNCOV
1779
                public ObjectSortingFlags EntitySortingFlags { get; set; }
×
1780

1781
                /// <summary>
1782
                /// Controls symbol table naming
1783
                /// </summary>
1784
                /// <remarks>
1785
                /// System variable EXTNAMES
1786
                /// </remarks>
1787
                [CadSystemVariable("$EXTNAMES", 290)]
UNCOV
1788
                public bool ExtendedNames { get; set; } = true;
×
1789

1790
                /// <summary>
1791
                /// Extension line lineweight
1792
                /// </summary>
1793
                /// <remarks>
1794
                /// System variable DIMLWE
1795
                /// </remarks>
1796
                [CadSystemVariable("$DIMLWE", 70)]
1797
                public LineWeightType ExtensionLineWeight
1798
                {
UNCOV
1799
                        get { return this._dimensionStyleOverrides.ExtensionLineWeight; }
×
1800
                        set
UNCOV
1801
                        {
×
UNCOV
1802
                                this._dimensionStyleOverrides.ExtensionLineWeight = value;
×
UNCOV
1803
                        }
×
1804
                }
1805

1806
                /// <summary>
1807
                /// Determines whether xref clipping boundaries are visible or plotted in the current drawing.
1808
                /// </summary>
1809
                /// <remarks>
1810
                /// System variable XCLIPFRAME
1811
                /// </remarks>
1812
                [CadSystemVariable("$XCLIPFRAME", 280)]
UNCOV
1813
                public XClipFrameType ExternalReferenceClippingBoundaryType { get; set; } = XClipFrameType.DisplayNotPlot;
×
1814

1815
                /// <summary>
1816
                /// Adjusts the smoothness of shaded and rendered objects, rendered shadows, and objects with hidden lines removed.
1817
                /// </summary>
1818
                /// <remarks>
1819
                /// System variable FACETRES.
1820
                /// </remarks>
1821
                /// <value>
1822
                /// Valid values are from 0.01 to 10.0.
1823
                /// </value>
1824
                [CadSystemVariable("$FACETRES", 40)]
1825
                public double FacetResolution
1826
                {
1827
                        get
UNCOV
1828
                        {
×
UNCOV
1829
                                return this._facetResolution;
×
UNCOV
1830
                        }
×
1831
                        set
UNCOV
1832
                        {
×
UNCOV
1833
                                ObjectExtensions.InRange(value, 0.01, 10, "FACETRES valid values are from 0.01 to 10.0");
×
UNCOV
1834
                                this._facetResolution = value;
×
UNCOV
1835
                        }
×
1836
                }
1837

1838
                /// <summary>
1839
                /// Stores the current fillet radius for 2D objects.
1840
                /// </summary>
1841
                /// <remarks>
1842
                /// System variable FILLETRAD.
1843
                /// </remarks>
1844
                [CadSystemVariable("$FILLETRAD", 40)]
UNCOV
1845
                public double FilletRadius { get; set; } = 0.0d;
×
1846

1847
                /// <summary>
1848
                /// Specifies whether hatches and fills, 2D solids, and wide polylines are filled in.
1849
                /// </summary>
1850
                /// <remarks>
1851
                /// System variable FILLMODE.
1852
                /// </remarks>
1853
                [CadSystemVariable("$FILLMODE", 70)]
UNCOV
1854
                public bool FillMode { get; set; } = true;
×
1855

1856
                /// <summary>
1857
                /// Set at creation time, uniquely identifies a particular drawing
1858
                /// </summary>
1859
                /// <remarks>
1860
                /// System variable FINGERPRINTGUID
1861
                /// </remarks>
1862
                [CadSystemVariable("$FINGERPRINTGUID", 2)]
UNCOV
1863
                public string FingerPrintGuid { get; internal set; } = Guid.NewGuid().ToString();
×
1864

1865
                /// <summary>
1866
                /// 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
1867
                /// </summary>
1868
                /// <remarks>
1869
                /// System variable HALOGAP
1870
                /// </remarks>
1871
                [CadSystemVariable("$HALOGAP", 280)]
UNCOV
1872
                public byte HaloGapPercentage { get; set; } = 0;
×
1873

1874
                /// <summary>
1875
                /// Next available handle.
1876
                /// </summary>
1877
                /// <remarks>
1878
                /// System variable HANDSEED.
1879
                /// </remarks>
1880
                [CadSystemVariable("$HANDSEED", 5)]
UNCOV
1881
                public ulong HandleSeed { get; internal set; } = 0x01;
×
1882

1883
                /// <summary>
1884
                /// Specifies HIDETEXT system variable
1885
                /// </summary>
1886
                /// <remarks>
1887
                /// System variable HIDETEXT
1888
                /// </remarks>
1889
                [CadSystemVariable("$HIDETEXT", 280)]   //note: mismatch with docs, code 290
UNCOV
1890
                public byte HideText { get; set; }
×
1891

1892
                /// <summary>
1893
                /// Path for all relative hyperlinks in the drawing. If null, the drawing path is used
1894
                /// </summary>
1895
                /// <remarks>
1896
                /// System variable HYPERLINKBASE
1897
                /// </remarks>
1898
                [CadSystemVariable("$HYPERLINKBASE", 1)]
UNCOV
1899
                public string HyperLinkBase { get; set; }
×
1900

1901
                /// <summary>
1902
                /// Controls whether layer and spatial indexes are created and saved in drawing files
1903
                /// </summary>
1904
                /// <remarks>
1905
                /// System variable INDEXCTL
1906
                /// </remarks>
1907
                [CadSystemVariable("$INDEXCTL", 280)]
UNCOV
1908
                public IndexCreationFlags IndexCreationFlags { get; set; }
×
1909

1910
                /// <summary>
1911
                /// Default drawing units for blocks
1912
                /// </summary>
1913
                /// <remarks>
1914
                /// System variable INSUNITS
1915
                /// </remarks>
1916
                [CadSystemVariable("$INSUNITS", 70)]
UNCOV
1917
                public UnitsType InsUnits { get; set; } = UnitsType.Unitless;
×
1918

1919
                /// <summary>
1920
                /// Represents the ACI color index of the "interference objects" created during the INTERFERE command. Default value is 1
1921
                /// </summary>
1922
                /// <remarks>
1923
                /// System variable INTERFERECOLOR
1924
                /// </remarks>
1925
                [CadSystemVariable("$INTERFERECOLOR", 62)]
UNCOV
1926
                public Color InterfereColor { get; set; } = new Color(1);
×
1927

UNCOV
1928
                public byte IntersectionDisplay { get; set; }
×
1929

1930
                /// <summary>
1931
                /// Line weight joint setting for new objects
1932
                /// </summary>
1933
                /// <remarks>
1934
                /// System variable JOINSTYLE
1935
                /// </remarks>
1936
                [CadSystemVariable("$JOINSTYLE", 280)]
UNCOV
1937
                public short JoinStyle { get; set; }
×
1938

1939
                /// <summary>
1940
                /// Displays the name of the last person who modified the file
1941
                /// </summary>
1942
                /// <remarks>
1943
                /// System variable LASTSAVEDBY
1944
                /// </remarks>
1945
                [CadSystemVariable(DxfReferenceType.Ignored, "$LASTSAVEDBY", 3)]
UNCOV
1946
                public string LastSavedBy { get; set; } = "ACadSharp";
×
1947

1948
                /// <summary>
1949
                /// Specifies the latitude of the drawing model in decimal format.
1950
                /// </summary>
1951
                /// <remarks>
1952
                /// System variable LATITUDE
1953
                /// </remarks>
1954
                [CadSystemVariable("$LATITUDE", 40)]
UNCOV
1955
                public double Latitude { get; set; } = 37.7950d;
×
1956

1957
                /// <remarks>
1958
                /// System variable LENSLENGTH
1959
                /// </remarks>
1960
                [CadSystemVariable("$LENSLENGTH", 40)]
UNCOV
1961
                public double LensLength { get; set; }
×
1962

1963
                /// <summary>
1964
                /// Controls whether you can create objects outside the grid limits.
1965
                /// </summary>
1966
                /// <remarks>
1967
                /// System variable LIMCHECK.
1968
                /// </remarks>
1969
                [CadSystemVariable("$LIMCHECK", 70)]
UNCOV
1970
                public bool LimitCheckingOn { get; set; } = false;
×
1971

1972
                /// <summary>
1973
                /// Sets the linear units format for creating objects.
1974
                /// </summary>
1975
                /// <remarks>
1976
                /// System variable LUNITS.
1977
                /// </remarks>
1978
                [CadSystemVariable("$LUNITS", 70)]
UNCOV
1979
                public LinearUnitFormat LinearUnitFormat { get; set; } = LinearUnitFormat.Decimal;
×
1980

1981
                /// <summary>
1982
                /// Sets the display precision for linear units and coordinates.
1983
                /// </summary>
1984
                /// <remarks>
1985
                /// System variable LUPREC.
1986
                /// </remarks>
1987
                [CadSystemVariable("$LUPREC", 70)]
1988
                public short LinearUnitPrecision
1989
                {
1990
                        get
UNCOV
1991
                        {
×
UNCOV
1992
                                return this._linearUnitPrecision;
×
UNCOV
1993
                        }
×
1994
                        set
UNCOV
1995
                        {
×
UNCOV
1996
                                ObjectExtensions.InRange(value, 0, 8, "LUPREC valid values are from 0 to 8");
×
UNCOV
1997
                                this._linearUnitPrecision = value;
×
UNCOV
1998
                        }
×
1999
                }
2000

2001
                /// <summary>
2002
                /// Sets the global linetype scale factor.
2003
                /// </summary>
2004
                /// <remarks>
2005
                /// System variable LTSCALE.
2006
                /// </remarks>
2007
                [CadSystemVariable("$LTSCALE", 40)]
UNCOV
2008
                public double LineTypeScale { get; set; } = 1.0d;
×
2009

2010
                /// <remarks>
2011
                /// System variable OLESTARTUP
2012
                /// </remarks>
2013
                //[CadSystemVariable("$OLESTARTUP", 290)]
UNCOV
2014
                public bool LoadOLEObject { get; set; }
×
2015

2016
                /// <remarks>
2017
                /// System variable LOFTNORMALS
2018
                /// </remarks>
2019
                [CadSystemVariable("$LOFTNORMALS", 280)]
UNCOV
2020
                public char LoftedObjectNormals { get; set; }
×
2021

2022
                /// <summary>
2023
                /// Specifies the longitude of the drawing model in decimal format.
2024
                /// </summary>
2025
                /// <remarks>
2026
                /// System variable LONGITUDE
2027
                /// </remarks>
2028
                [CadSystemVariable("$LONGITUDE", 40)]
UNCOV
2029
                public double Longitude { get; set; } = -122.394d;
×
2030

2031
                /// <summary>
2032
                /// Maintenance version number(should be ignored)
2033
                /// </summary>
2034
                /// <remarks>
2035
                /// System variable ACADMAINTVER.
2036
                /// </remarks>
2037
                [CadSystemVariable(DxfReferenceType.Ignored, "$ACADMAINTVER", 70)]
UNCOV
2038
                public short MaintenanceVersion { get; internal set; }
×
2039

2040
                /// <summary>
2041
                /// Sets the maximum number of viewports that can be active at one time in a layout.
2042
                /// </summary>
2043
                /// <remarks>
2044
                /// System variable MAXACTVP.
2045
                /// </remarks>
2046
                [CadSystemVariable("$MAXACTVP", 70)]
UNCOV
2047
                public short MaxViewportCount { get; set; } = 64;
×
2048

2049
                /// <summary>
2050
                /// Controls whether the current drawing uses imperial or metric hatch pattern and linetype files.
2051
                /// </summary>
2052
                /// <remarks>
2053
                /// System variable MEASUREMENT
2054
                /// </remarks>
2055
                [CadSystemVariable("$MEASUREMENT", 70)]
UNCOV
2056
                public MeasurementUnits MeasurementUnits { get; set; } = MeasurementUnits.Metric;
×
2057

2058
                /// <summary>
2059
                /// Name of menu file.
2060
                /// </summary>
2061
                /// <remarks>
2062
                /// System variable MENU.
2063
                /// </remarks>
2064
                [CadSystemVariable("$MENU", 1)]
UNCOV
2065
                public string MenuFileName { get; set; } = ".";
×
2066

2067
                /// <summary>
2068
                /// Controls how MIRROR reflects text.
2069
                /// </summary>
2070
                /// <remarks>
2071
                /// System variable MIRRTEXT.
2072
                /// </remarks>
2073
                [CadSystemVariable("$MIRRTEXT", 70)]
UNCOV
2074
                public bool MirrorText { get; set; } = false;
×
2075

2076
                /// <summary>
2077
                /// X, Y, and Z drawing extents upper-right corner(in WCS)
2078
                /// </summary>
2079
                /// <remarks>
2080
                /// System variable EXTMAX
2081
                /// </remarks>
2082
                [CadSystemVariable("$EXTMAX", 10, 20, 30)]
UNCOV
2083
                public XYZ ModelSpaceExtMax { get; set; }
×
2084

2085
                /// <summary>
2086
                /// X, Y, and Z drawing extents lower-left corner (in WCS)
2087
                /// </summary>
2088
                /// <remarks>
2089
                /// System variable EXTMIN
2090
                /// </remarks>
2091
                [CadSystemVariable("$EXTMIN", 10, 20, 30)]
UNCOV
2092
                public XYZ ModelSpaceExtMin { get; set; }
×
2093

2094
                /// <summary>
2095
                /// Insertion base set by BASE command(in WCS)
2096
                /// </summary>
2097
                /// <remarks>
2098
                /// System variable INSBASE
2099
                /// </remarks>
2100
                [CadSystemVariable("$INSBASE", 10, 20, 30)]
UNCOV
2101
                public XYZ ModelSpaceInsertionBase { get; set; } = XYZ.Zero;
×
2102

2103
                /// <summary>
2104
                /// XY drawing limits upper-right corner (in WCS)
2105
                /// </summary>
2106
                /// <remarks>
2107
                /// System variable LIMMAX
2108
                /// </remarks>
2109
                [CadSystemVariable("$LIMMAX", 10, 20)]
UNCOV
2110
                public XY ModelSpaceLimitsMax { get; set; }
×
2111

2112
                /// <summary>
2113
                /// XY drawing limits lower-left corner (in WCS)
2114
                /// </summary>
2115
                /// <remarks>
2116
                /// System variable LIMMIN
2117
                /// </remarks>
2118
                [CadSystemVariable("$LIMMIN", 10, 20)]
UNCOV
2119
                public XY ModelSpaceLimitsMin { get; set; }
×
2120

2121
                /// <summary>
2122
                /// Origin of current UCS(in WCS)
2123
                /// </summary>
2124
                /// <remarks>
2125
                /// System variable UCSORG
2126
                /// </remarks>
2127
                [CadSystemVariable("$UCSORG", 10, 20, 30)]
2128
                public XYZ ModelSpaceOrigin
2129
                {
UNCOV
2130
                        get { return this.ModelSpaceUcs.Origin; }
×
2131
                        set
UNCOV
2132
                        {
×
UNCOV
2133
                                this.ModelSpaceUcs.Origin = value;
×
UNCOV
2134
                        }
×
2135
                }
2136

2137
                /// <summary>
2138
                /// Point which becomes the new UCS origin after changing model space UCS to BACK when PUCSBASE is set to WORLD
2139
                /// </summary>
2140
                /// <remarks>
2141
                /// System variable UCSORGBACK
2142
                /// </remarks>
2143
                [CadSystemVariable("$UCSORGBACK", 10, 20, 30)]
UNCOV
2144
                public XYZ ModelSpaceOrthographicBackDOrigin { get; set; }
×
2145

2146
                /// <summary>
2147
                /// Point which becomes the new UCS origin after changing model space UCS to BOTTOM when PUCSBASE is set to WORLD
2148
                /// </summary>
2149
                /// <remarks>
2150
                /// System variable UCSORGBOTTOM
2151
                /// </remarks>
2152
                [CadSystemVariable("$UCSORGBOTTOM", 10, 20, 30)]
UNCOV
2153
                public XYZ ModelSpaceOrthographicBottomDOrigin { get; set; }
×
2154

2155
                /// <summary>
2156
                /// Point which becomes the new UCS origin after changing model space UCS to FRONT when PUCSBASE is set to WORLD
2157
                /// </summary>
2158
                /// <remarks>
2159
                /// System variable UCSORGFRONT
2160
                /// </remarks>
2161
                [CadSystemVariable("$UCSORGFRONT", 10, 20, 30)]
UNCOV
2162
                public XYZ ModelSpaceOrthographicFrontDOrigin { get; set; }
×
2163

2164
                /// <summary>
2165
                /// Point which becomes the new UCS origin after changing model space UCS to LEFT when PUCSBASE is set to WORLD
2166
                /// </summary>
2167
                /// <remarks>
2168
                /// System variable UCSORGLEFT
2169
                /// </remarks>
2170
                [CadSystemVariable("$UCSORGLEFT", 10, 20, 30)]
UNCOV
2171
                public XYZ ModelSpaceOrthographicLeftDOrigin { get; set; }
×
2172

2173
                /// <summary>
2174
                /// Point which becomes the new UCS origin after changing model space UCS to RIGHT when PUCSBASE is set to WORLD
2175
                /// </summary>
2176
                /// <remarks>
2177
                /// System variable UCSORGRIGHT
2178
                /// </remarks>
2179
                [CadSystemVariable("$UCSORGRIGHT", 10, 20, 30)]
UNCOV
2180
                public XYZ ModelSpaceOrthographicRightDOrigin { get; set; }
×
2181

2182
                /// <summary>
2183
                /// Point which becomes the new UCS origin after changing model space UCS to TOP when PUCSBASE is set to WORLD
2184
                /// </summary>
2185
                /// <remarks>
2186
                /// System variable UCSORGTOP
2187
                /// </remarks>
2188
                [CadSystemVariable("$UCSORGTOP", 10, 20, 30)]
UNCOV
2189
                public XYZ ModelSpaceOrthographicTopDOrigin { get; set; }
×
2190

2191
                //TODO: How header UCS work??
UNCOV
2192
                public UCS ModelSpaceUcs { get; private set; } = new UCS();
×
2193

UNCOV
2194
                public UCS ModelSpaceUcsBase { get; private set; } = new UCS();
×
2195

2196
                /// <summary>
2197
                /// Direction of the current UCS X axis (in WCS)
2198
                /// </summary>
2199
                /// <remarks>
2200
                /// System variable UCSXDIR
2201
                /// </remarks>
2202
                [CadSystemVariable("$UCSXDIR", 10, 20, 30)]
2203
                public XYZ ModelSpaceXAxis
2204
                {
UNCOV
2205
                        get { return this.ModelSpaceUcs.XAxis; }
×
2206
                        set
UNCOV
2207
                        {
×
UNCOV
2208
                                this.ModelSpaceUcs.XAxis = value;
×
UNCOV
2209
                        }
×
2210
                }
2211

2212
                /// <summary>
2213
                /// Direction of the current UCS Y axis (in WCS)
2214
                /// </summary>
2215
                /// <remarks>
2216
                /// System variable UCSYDIR
2217
                /// </remarks>
2218
                [CadSystemVariable("$UCSYDIR", 10, 20, 30)]
2219
                public XYZ ModelSpaceYAxis
2220
                {
UNCOV
2221
                        get { return this.ModelSpaceUcs.YAxis; }
×
2222
                        set
UNCOV
2223
                        {
×
UNCOV
2224
                                this.ModelSpaceUcs.YAxis = value;
×
UNCOV
2225
                        }
×
2226
                }
2227

2228
                /// <remarks>
2229
                /// System variable NORTHDIRECTION
2230
                /// </remarks>
2231
                [CadSystemVariable("$NORTHDIRECTION", 40)]
UNCOV
2232
                public double NorthDirection { get; set; }
×
2233

2234
                /// <summary>
2235
                /// Sets the number of line segments to be generated for each spline-fit polyline generated by the Spline option of the PEDIT command.
2236
                /// </summary>
2237
                /// <remarks>
2238
                /// System variable SPLINESEGS.
2239
                /// </remarks>
2240
                [CadSystemVariable("$SPLINESEGS", 70)]
UNCOV
2241
                public short NumberOfSplineSegments { get; set; } = 8;
×
2242

2243
                /// <summary>
2244
                /// Sets running object snaps.
2245
                /// </summary>
2246
                /// <remarks>
2247
                /// System variable OSMODE.
2248
                /// </remarks>
2249
                [CadSystemVariable("$OSMODE", 70)]
UNCOV
2250
                public ObjectSnapMode ObjectSnapMode { get; set; } = (ObjectSnapMode)4133;
×
2251

UNCOV
2252
                public Color ObscuredColor { get; set; }
×
2253

2254
                /// <remarks>
2255
                /// System variable OBSCUREDLTYPE
2256
                /// </remarks>
UNCOV
2257
                public byte ObscuredType { get; set; }
×
2258

2259
                /// <summary>
2260
                /// Constrains cursor movement to the perpendicular.
2261
                /// </summary>
2262
                /// <remarks>
2263
                /// System variable ORTHOMODE.
2264
                /// </remarks>
2265
                [CadSystemVariable("$ORTHOMODE", 70)]
UNCOV
2266
                public bool OrthoMode { get; set; } = false;
×
2267

2268
                /// <summary>
2269
                /// Name of the UCS that defines the origin and orientation of orthographic UCS settings (paper space only)
2270
                /// </summary>
2271
                /// <remarks>
2272
                /// System variable PUCSBASE
2273
                /// </remarks>
2274
                [CadSystemVariable("$PUCSBASE", true, 2)]
2275
                public string PaperSpaceBaseName
2276
                {
2277
                        get { return this.PaperSpaceUcsBase.Name; }
×
2278
                        set
2279
                        {
×
2280
                                this.PaperSpaceUcsBase.Name = value;
×
2281
                        }
×
2282
                }
2283

2284
                /// <summary>
2285
                /// Current elevation set by ELEV command
2286
                /// </summary>
2287
                /// <remarks>
2288
                /// System variable PELEVATION
2289
                /// </remarks>
2290
                [CadSystemVariable("$PELEVATION", 40)]
2291
                public double PaperSpaceElevation
2292
                {
UNCOV
2293
                        get { return this.PaperSpaceUcs.Elevation; }
×
2294
                        set
UNCOV
2295
                        {
×
UNCOV
2296
                                this.PaperSpaceUcs.Elevation = value;
×
UNCOV
2297
                        }
×
2298
                }
2299

2300
                /// <summary>
2301
                /// X, Y, and Z drawing extents upper-right corner(in WCS).
2302
                /// </summary>
2303
                /// <remarks>
2304
                /// System variable PEXTMAX.
2305
                /// </remarks>
2306
                [CadSystemVariable("$PEXTMAX", 10, 20, 30)]
UNCOV
2307
                public XYZ PaperSpaceExtMax { get; set; } = XYZ.Zero;
×
2308

2309
                /// <summary>
2310
                /// X, Y, and Z drawing extents lower-left corner (in WCS).
2311
                /// </summary>
2312
                /// <remarks>
2313
                /// System variable PEXTMIN.
2314
                /// </remarks>
2315
                [CadSystemVariable("$PEXTMIN", 10, 20, 30)]
UNCOV
2316
                public XYZ PaperSpaceExtMin { get; set; } = XYZ.Zero;
×
2317

2318
                /// <summary>
2319
                /// Paper space insertion base point.
2320
                /// </summary>
2321
                /// <remarks>
2322
                /// System variable PINSBASE.
2323
                /// </remarks>
2324
                [CadSystemVariable("$PINSBASE", 10, 20, 30)]
UNCOV
2325
                public XYZ PaperSpaceInsertionBase { get; set; } = XYZ.Zero;
×
2326

2327
                /// <summary>
2328
                /// Limits checking in paper space when nonzero.
2329
                /// </summary>
2330
                /// <remarks>
2331
                /// System variable PLIMCHECK.
2332
                /// </remarks>
2333
                [CadSystemVariable("$PLIMCHECK", 70)]
UNCOV
2334
                public bool PaperSpaceLimitsChecking { get; set; } = false;
×
2335

2336
                /// <summary>
2337
                /// XY drawing limits upper-right corner (in WCS).
2338
                /// </summary>
2339
                /// <remarks>
2340
                /// System variable PLIMMAX.
2341
                /// </remarks>
2342
                [CadSystemVariable("$PLIMMAX", 10, 20)]
UNCOV
2343
                public XY PaperSpaceLimitsMax { get; set; } = XY.Zero;
×
2344

2345
                /// <summary>
2346
                /// XY drawing limits lower-left corner(in WCS).
2347
                /// </summary>
2348
                /// <remarks>
2349
                /// System variable PLIMMIN.
2350
                /// </remarks>
2351
                [CadSystemVariable("$PLIMMIN", 10, 20)]
UNCOV
2352
                public XY PaperSpaceLimitsMin { get; set; } = XY.Zero;
×
2353

2354
                /// <summary>
2355
                /// Controls paper space linetype scaling.
2356
                /// </summary>
2357
                /// <remarks>
2358
                /// System variable PSLTSCALE.
2359
                /// </remarks>
2360
                [CadSystemVariable("$PSLTSCALE", 70)]
UNCOV
2361
                public SpaceLineTypeScaling PaperSpaceLineTypeScaling { get; set; } = SpaceLineTypeScaling.Normal;
×
2362

2363
                /// <summary>
2364
                /// Current paper space UCS name
2365
                /// </summary>
2366
                /// <remarks>
2367
                /// System variable PUCSNAME
2368
                /// </remarks>
2369
                [CadSystemVariable("$PUCSNAME", true, 2)]
2370
                public string PaperSpaceName
2371
                {
2372
                        get { return this.PaperSpaceUcs.Name; }
×
2373
                        set
2374
                        {
×
2375
                                this.PaperSpaceUcs.Name = value;
×
2376
                        }
×
2377
                }
2378

2379
                /// <summary>
2380
                /// Point which becomes the new UCS origin after changing paper space UCS to BACK when PUCSBASE is set to WORLD
2381
                /// </summary>
2382
                /// <remarks>
2383
                /// System variable PUCSORGBACK
2384
                /// </remarks>
2385
                [CadSystemVariable("$PUCSORGBACK", 10, 20, 30)]
UNCOV
2386
                public XYZ PaperSpaceOrthographicBackDOrigin { get; set; }
×
2387

2388
                /// <summary>
2389
                /// Point which becomes the new UCS origin after changing paper space UCS to BOTTOM when PUCSBASE is set to WORLD
2390
                /// </summary>
2391
                /// <remarks>
2392
                /// System variable PUCSORGBOTTOM
2393
                /// </remarks>
2394
                [CadSystemVariable("$PUCSORGBOTTOM", 10, 20, 30)]
UNCOV
2395
                public XYZ PaperSpaceOrthographicBottomDOrigin { get; set; }
×
2396

2397
                /// <summary>
2398
                /// Point which becomes the new UCS origin after changing paper space UCS to FRONT when PUCSBASE is set to WORLD
2399
                /// </summary>
2400
                /// <remarks>
2401
                /// System variable PUCSORGFRONT
2402
                /// </remarks>
2403
                [CadSystemVariable("$PUCSORGFRONT", 10, 20, 30)]
UNCOV
2404
                public XYZ PaperSpaceOrthographicFrontDOrigin { get; set; }
×
2405

2406
                /// <summary>
2407
                /// Point which becomes the new UCS origin after changing paper space UCS to LEFT when PUCSBASE is set to WORLD
2408
                /// </summary>
2409
                /// <remarks>
2410
                /// System variable PUCSORGLEFT
2411
                /// </remarks>
2412
                [CadSystemVariable("$PUCSORGLEFT", 10, 20, 30)]
UNCOV
2413
                public XYZ PaperSpaceOrthographicLeftDOrigin { get; set; }
×
2414

2415
                /// <summary>
2416
                /// Point which becomes the new UCS origin after changing paper space UCS to RIGHT when PUCSBASE is set to WORLD
2417
                /// </summary>
2418
                /// <remarks>
2419
                /// System variable PUCSORGRIGHT
2420
                /// </remarks>
2421
                [CadSystemVariable("$PUCSORGRIGHT", 10, 20, 30)]
UNCOV
2422
                public XYZ PaperSpaceOrthographicRightDOrigin { get; set; }
×
2423

2424
                /// <summary>
2425
                /// Point which becomes the new UCS origin after changing paper space UCS to TOP when PUCSBASE is set to WORLD
2426
                /// </summary>
2427
                /// <remarks>
2428
                /// System variable PUCSORGTOP
2429
                /// </remarks>
2430
                [CadSystemVariable("$PUCSORGTOP", 10, 20, 30)]
UNCOV
2431
                public XYZ PaperSpaceOrthographicTopDOrigin { get; set; }
×
2432

UNCOV
2433
                public UCS PaperSpaceUcs { get; private set; } = new UCS();
×
2434

UNCOV
2435
                public UCS PaperSpaceUcsBase { get; private set; } = new UCS();
×
2436

2437
                /// <summary>
2438
                /// Origin of current UCS (in WCS)
2439
                /// </summary>
2440
                /// <remarks>
2441
                /// System variable PUCSORG
2442
                /// </remarks>
2443
                [CadSystemVariable("$PUCSORG", 10, 20, 30)]
2444
                public XYZ PaperSpaceUcsOrigin
2445
                {
UNCOV
2446
                        get { return this.PaperSpaceUcs.Origin; }
×
2447
                        set
UNCOV
2448
                        {
×
UNCOV
2449
                                this.PaperSpaceUcs.Origin = value;
×
UNCOV
2450
                        }
×
2451
                }
2452

2453
                /// <summary>
2454
                /// Direction of the current UCS X axis (in WCS)
2455
                /// </summary>
2456
                /// <remarks>
2457
                /// System variable PUCSXDIR
2458
                /// </remarks>
2459
                [CadSystemVariable("$PUCSXDIR", 10, 20, 30)]
2460
                public XYZ PaperSpaceUcsXAxis
2461
                {
UNCOV
2462
                        get { return this.PaperSpaceUcs.XAxis; }
×
2463
                        set
UNCOV
2464
                        {
×
UNCOV
2465
                                this.PaperSpaceUcs.XAxis = value;
×
UNCOV
2466
                        }
×
2467
                }
2468

2469
                /// <summary>
2470
                /// Direction of the current UCS Y aYis (in WCS)
2471
                /// </summary>
2472
                /// <remarks>
2473
                /// System variable PUCSYDIR
2474
                /// </remarks>
2475
                [CadSystemVariable("$PUCSYDIR", 10, 20, 30)]
2476
                public XYZ PaperSpaceUcsYAxis
2477
                {
UNCOV
2478
                        get { return this.PaperSpaceUcs.YAxis; }
×
2479
                        set
UNCOV
2480
                        {
×
UNCOV
2481
                                this.PaperSpaceUcs.YAxis = value;
×
UNCOV
2482
                        }
×
2483
                }
2484

2485
                /// <summary>
2486
                /// Indicates whether the current drawing is in a Color-Dependent or Named Plot Style mode
2487
                /// </summary>
2488
                /// <remarks>
2489
                /// System variable PSTYLEMODE
2490
                /// </remarks>
2491
                [CadSystemVariable("$PSTYLEMODE", 290)]
UNCOV
2492
                public short PlotStyleMode { get; set; }
×
2493

2494
                /// <summary>
2495
                /// Controls how point objects are displayed.
2496
                /// </summary>
2497
                /// <remarks>
2498
                /// System variable PDMODE.
2499
                /// </remarks>
2500
                [CadSystemVariable("$PDMODE", 70)]
UNCOV
2501
                public short PointDisplayMode { get; set; } = 0;
×
2502

2503
                /// <summary>
2504
                /// Sets the display size for point objects.
2505
                /// </summary>
2506
                /// <remarks>
2507
                /// System variable PDSIZE.
2508
                /// </remarks>
2509
                [CadSystemVariable("$PDSIZE", 40)]
UNCOV
2510
                public double PointDisplaySize { get; set; } = 0.0d;
×
2511

2512
                /// <summary>
2513
                /// Governs the generation of linetype patterns around the vertices of a 2D polyline:<br/>
2514
                /// 1 = Linetype is generated in a continuous pattern around vertices of the polyline<br/>
2515
                /// 0 = Each segment of the polyline starts and ends with a dash
2516
                /// </summary>
2517
                /// <remarks>
2518
                /// System variable PLINEGEN
2519
                /// </remarks>
2520
                [CadSystemVariable("$PLINEGEN", 70)]
UNCOV
2521
                public bool PolylineLineTypeGeneration { get; set; } = false;
×
2522

2523
                /// <summary>
2524
                /// Stores the default polyline width.
2525
                /// </summary>
2526
                /// <remarks>
2527
                /// System variable PLINEWID.
2528
                /// </remarks>
2529
                [CadSystemVariable("$PLINEWID", 40)]
UNCOV
2530
                public double PolylineWidthDefault { get; set; } = 0.0d;
×
2531

2532
                /// <summary>
2533
                /// 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
2534
                /// </summary>
2535
                /// <remarks>
2536
                /// System variable PROJECTNAME
2537
                /// </remarks>
2538
                [CadSystemVariable("$PROJECTNAME", 1)]
UNCOV
2539
                public string ProjectName { get; set; }
×
2540

2541
                /// <summary>
2542
                /// Specifies whether images of proxy objects are saved in the drawing.
2543
                /// </summary>
2544
                /// <remarks>
2545
                /// System variable PROXYGRAPHICS.
2546
                /// </remarks>
2547
                [CadSystemVariable("$PROXYGRAPHICS", 70)]
UNCOV
2548
                public bool ProxyGraphics { get; set; } = true;
×
2549

2550
                /// <summary>
2551
                /// Quick Text mode on if nonzero
2552
                /// </summary>
2553
                /// <remarks>
2554
                /// System variable QTEXTMODE.
2555
                /// </remarks>
2556
                [CadSystemVariable("$QTEXTMODE", 70)]
UNCOV
2557
                public bool QuickTextMode { get; set; } = false;
×
2558

2559
                /// <summary>
2560
                /// Obsolete. Controls automatic regeneration of the drawing.
2561
                /// </summary>
2562
                /// <remarks>
2563
                /// System variable REGENMODE.
2564
                /// </remarks>
2565
                [CadSystemVariable("$REGENMODE", 70)]
UNCOV
2566
                public bool RegenerationMode { get; set; } = true;
×
2567

2568
                /// <summary>
2569
                /// The default value is 0.
2570
                /// Read only.
2571
                /// </summary>
2572
                /// <remarks>
2573
                /// System variable REQUIREDVERSIONS <br/>
2574
                /// Only in <see cref="ACadVersion.AC1024"/> or above
2575
                /// </remarks>
2576
                [CadSystemVariable(DxfReferenceType.Ignored, "$REQUIREDVERSIONS", 70)]
UNCOV
2577
                public long RequiredVersions { get; set; }
×
2578

2579
                /// <summary>
2580
                /// Controls the properties of xref-dependent layers: <br/>
2581
                /// 0 = Don't retain xref-dependent visibility settings <br/>
2582
                /// 1 = Retain xref-dependent visibility settings <br/>
2583
                /// </summary>
2584
                /// <remarks>
2585
                /// System variable VISRETAIN.
2586
                /// </remarks>
2587
                [CadSystemVariable("$VISRETAIN", 70)]
UNCOV
2588
                public bool RetainXRefDependentVisibilitySettings { get; set; } = true;
×
2589

2590
                /// <summary>
2591
                /// Sets the ratio of diffuse reflective light to ambient light.
2592
                /// </summary>
2593
                /// <remarks>
2594
                /// System variable SHADEDIF.
2595
                /// </remarks>
2596
                /// <value>
2597
                /// range 1-100
2598
                /// </value>
2599
                [CadSystemVariable("$SHADEDIF", 70)]
UNCOV
2600
                public short ShadeDiffuseToAmbientPercentage { get; set; } = 70;
×
2601

2602
                /// <summary>
2603
                /// Controls the shading of edges.
2604
                /// </summary>
2605
                /// <remarks>
2606
                /// System variable SHADEDGE.
2607
                /// </remarks>
2608
                [CadSystemVariable("$SHADEDGE", 70)]
UNCOV
2609
                public ShadeEdgeType ShadeEdge { get; set; } = ShadeEdgeType.FacesInEntityColorEdgesInBlack;
×
2610

2611
                /// <summary>
2612
                /// Shadow mode for a 3D object
2613
                /// </summary>
2614
                /// <remarks>
2615
                /// System variable CSHADOW
2616
                /// </remarks>
2617
                [CadSystemVariable("$CSHADOW", 280)]
UNCOV
2618
                public ShadowMode ShadowMode { get; set; }
×
2619

2620
                /// <summary>
2621
                /// Location of the ground shadow plane. This is a Z axis ordinate
2622
                /// </summary>
2623
                /// <remarks>
2624
                /// System variable SHADOWPLANELOCATION
2625
                /// </remarks>
2626
                [CadSystemVariable("$SHADOWPLANELOCATION", 40)]
UNCOV
2627
                public double ShadowPlaneLocation { get; set; }
×
2628

2629
                /// <summary>
2630
                /// Determines whether the Model tab or the most-recently accessed named layout tab is active.
2631
                /// </summary>
2632
                /// <remarks>
2633
                /// System variable TILEMODE.
2634
                /// </remarks>
2635
                [CadSystemVariable("$TILEMODE", 70)]
UNCOV
2636
                public bool ShowModelSpace { get; set; }
×
2637

2638
                /// <remarks>
2639
                /// System variable SHOWHIST
2640
                /// </remarks>
2641
                [CadSystemVariable("$SHOWHIST", 280)]
UNCOV
2642
                public char ShowSolidsHistory { get; set; }
×
2643

2644
                /// <summary>
2645
                /// Controls the display of helixes and smoothed mesh objects.
2646
                /// </summary>
2647
                /// <remarks>
2648
                /// System variable SPLFRAME.
2649
                /// </remarks>
2650
                [CadSystemVariable("$SPLFRAME", 70)]
UNCOV
2651
                public bool ShowSplineControlPoints { get; set; } = false;
×
2652

2653
                /// <summary>
2654
                /// Sketch record increment.
2655
                /// </summary>
2656
                /// <remarks>
2657
                /// System variable SKETCHINC.
2658
                /// </remarks>
2659
                [CadSystemVariable("$SKETCHINC", 40)]
UNCOV
2660
                public double SketchIncrement { get; set; } = 1.0d;
×
2661

2662
                /// <summary>
2663
                /// Determines the object type created by the SKETCH command.
2664
                /// </summary>
2665
                /// <remarks>
2666
                /// System variable SKPOLY.
2667
                /// </remarks>
2668
                [CadSystemVariable("$SKPOLY", 70)]
UNCOV
2669
                public bool SketchPolylines { get; set; } = false;
×
2670

2671
                /// <remarks>
2672
                /// System variable LOFTPARAM
2673
                /// </remarks>
2674
                [CadSystemVariable("$LOFTPARAM", 70)]
UNCOV
2675
                public short SolidLoftedShape { get; set; }
×
2676

2677
                /// <remarks>
2678
                /// System variable SOLIDHIST
2679
                /// </remarks>
2680
                [CadSystemVariable("$SOLIDHIST", 280)]
UNCOV
2681
                public char SolidsRetainHistory { get; set; }
×
2682

2683
                /// <summary>
2684
                /// Specifies the maximum depth, that is, the number of times the tree-structured spatial index can divide into branches.
2685
                /// </summary>
2686
                /// <remarks>
2687
                /// System variable TREEDEPTH.
2688
                /// </remarks>
2689
                [CadSystemVariable("$TREEDEPTH", 70)]
UNCOV
2690
                public short SpatialIndexMaxTreeDepth { get; set; } = 3020;
×
2691

2692
                /// <summary>
2693
                /// Sets the type of curve generated by the Spline option of the PEDIT command.
2694
                /// </summary>
2695
                /// <remarks>
2696
                /// System variable SPLINETYPE.
2697
                /// </remarks>
2698
                [CadSystemVariable("$SPLINETYPE", 70)]
UNCOV
2699
                public SplineType SplineType { get; set; } = SplineType.CubicBSpline;
×
2700

2701
                /// <remarks>
2702
                /// System variable TSTACKALIGN, default = 1(not present in DXF)
2703
                /// </remarks>
UNCOV
2704
                public short StackedTextAlignment { get; internal set; } = 1;
×
2705

2706
                /// <remarks>
2707
                /// TSTACKSIZE, default = 70(not present in DXF)
2708
                /// </remarks>
UNCOV
2709
                public short StackedTextSizePercentage { get; internal set; } = 70;
×
2710

2711
                /// <summary>
2712
                /// Specifies the size of each step when in walk or fly mode, in drawing units.
2713
                /// </summary>
2714
                /// <remarks>
2715
                /// System variable STEPSIZE
2716
                /// </remarks>
2717
                [CadSystemVariable("$STEPSIZE", 40)]
UNCOV
2718
                public double StepSize { get; set; } = 6.0d;
×
2719

2720
                /// <summary>
2721
                /// Specifies the number of steps taken per second when you are in walk or fly mode.
2722
                /// </summary>
2723
                /// <remarks>
2724
                /// System variable STEPSPERSEC
2725
                /// </remarks>
2726
                /// <value>
2727
                /// Valid values are from 1 to 30
2728
                /// </value>
2729
                [CadSystemVariable("$STEPSPERSEC", 40)]
2730
                public double StepsPerSecond
2731
                {
2732
                        get
UNCOV
2733
                        {
×
UNCOV
2734
                                return this._stepsPerSecond;
×
UNCOV
2735
                        }
×
2736
                        set
UNCOV
2737
                        {
×
UNCOV
2738
                                ObjectExtensions.InRange(value, 1, 30, "STEPSPERSEC valid values are from 1 to 30");
×
UNCOV
2739
                                this._stepsPerSecond = value;
×
UNCOV
2740
                        }
×
2741
                }
2742

2743
                /// <remarks>
2744
                /// System variable STYLESHEET
2745
                /// </remarks>
2746
                [CadSystemVariable("$STYLESHEET", 1)]
UNCOV
2747
                public string StyleSheetName { get; set; }
×
2748

2749
                /// <summary>
2750
                /// Surface density (for PEDIT Smooth) in M direction.
2751
                /// </summary>
2752
                /// <remarks>
2753
                /// System variable SURFU.
2754
                /// </remarks>
2755
                [CadSystemVariable("$SURFU", 70)]
UNCOV
2756
                public short SurfaceDensityU { get; set; } = 6;
×
2757

2758
                /// <summary>
2759
                /// Surface density(for PEDIT Smooth) in N direction.
2760
                /// </summary>
2761
                /// <remarks>
2762
                /// System variable SURFV.
2763
                /// </remarks>
2764
                [CadSystemVariable("$SURFV", 70)]
UNCOV
2765
                public short SurfaceDensityV { get; set; } = 6;
×
2766

2767
                /// <summary>
2768
                /// Specifies the number of contour lines displayed on the curved surfaces of 3D solids.
2769
                /// </summary>
2770
                /// <remarks>
2771
                /// System variable ISOLINES.
2772
                /// </remarks>
2773
                public short SurfaceIsolineCount
2774
                {
2775
                        get
UNCOV
2776
                        {
×
UNCOV
2777
                                return this._surfaceIsolineCount;
×
UNCOV
2778
                        }
×
2779
                        set
UNCOV
2780
                        {
×
UNCOV
2781
                                ObjectExtensions.InRange(value, 0, 2047, "ISOLINES valid values are from 0 to 2047");
×
UNCOV
2782
                                this._surfaceIsolineCount = value;
×
UNCOV
2783
                        }
×
2784
                }
2785

2786
                /// <summary>
2787
                /// Number of mesh tabulations in first direction.
2788
                /// </summary>
2789
                /// <remarks>
2790
                /// System variable SURFTAB1.
2791
                /// </remarks>
2792
                [CadSystemVariable("$SURFTAB1", 70)]
UNCOV
2793
                public short SurfaceMeshTabulationCount1 { get; set; } = 6;
×
2794

2795
                /// <summary>
2796
                /// Number of mesh tabulations in second direction.
2797
                /// </summary>
2798
                /// <remarks>
2799
                /// System variable SURFTAB2.
2800
                /// </remarks>
2801
                [CadSystemVariable("$SURFTAB2", 70)]
UNCOV
2802
                public short SurfaceMeshTabulationCount2 { get; set; } = 6;
×
2803

2804
                /// <summary>
2805
                /// Surface type for PEDIT Smooth.
2806
                /// </summary>
2807
                /// <remarks>
2808
                /// System variable SURFTYPE.
2809
                /// </remarks>
2810
                [CadSystemVariable("$SURFTYPE", 70)]
UNCOV
2811
                public short SurfaceType { get; set; } = 6;
×
2812

2813
                /// <remarks>
2814
                /// System variable PSOLHEIGHT
2815
                /// </remarks>
2816
                [CadSystemVariable("$PSOLHEIGHT", 40)]
UNCOV
2817
                public double SweptSolidHeight { get; set; }
×
2818

2819
                /// <remarks>
2820
                /// System variable PSOLWIDTH
2821
                /// </remarks>
2822
                [CadSystemVariable("$PSOLWIDTH", 40)]
UNCOV
2823
                public double SweptSolidWidth { get; set; }
×
2824

2825
                /// <summary>
2826
                /// Sets the default text height when creating new text objects.
2827
                /// </summary>
2828
                /// <remarks>
2829
                /// System variable TEXTSIZE.
2830
                /// </remarks>
2831
                [CadSystemVariable("$TEXTSIZE", 40)]
UNCOV
2832
                public double TextHeightDefault { get; set; } = 2.5d;
×
2833

2834
                /// <summary>
2835
                /// Sets the resolution of TrueType text for plotting and rendering.
2836
                /// </summary>
2837
                /// <remarks>
2838
                /// System variable TEXTQLTY.
2839
                /// </remarks>
2840
                public short TextQuality
2841
                {
2842
                        get
UNCOV
2843
                        {
×
UNCOV
2844
                                return this._textQuality;
×
UNCOV
2845
                        }
×
2846
                        set
UNCOV
2847
                        {
×
UNCOV
2848
                                ObjectExtensions.InRange(value, 0, 100, "TEXTQLTY valid values are from 0 to 100");
×
UNCOV
2849
                                this._textQuality = value;
×
UNCOV
2850
                        }
×
2851
                }
2852

2853
                /// <summary>
2854
                /// Sets the name of the current text style.
2855
                /// </summary>
2856
                /// <remarks>
2857
                /// System variable TEXTSTYLE.
2858
                /// </remarks>
2859
                [CadSystemVariable("$TEXTSTYLE", true, 7)]
2860
                public string CurrentTextStyleName
2861
                {
UNCOV
2862
                        get { return this._currentTextStyle.Name; }
×
2863
                        set
UNCOV
2864
                        {
×
UNCOV
2865
                                if (this.Document != null)
×
UNCOV
2866
                                {
×
UNCOV
2867
                                        this._currentTextStyle = this.Document.TextStyles[value];
×
UNCOV
2868
                                }
×
2869
                                else
UNCOV
2870
                                {
×
UNCOV
2871
                                        this._currentTextStyle = new TextStyle(value);
×
UNCOV
2872
                                }
×
UNCOV
2873
                        }
×
2874
                }
2875

2876
                /// <summary>
2877
                /// Sets the default 3D thickness property when creating 2D geometric objects.
2878
                /// </summary>
2879
                /// <remarks>
2880
                /// System variable THICKNESS.
2881
                /// </remarks>
2882
                [CadSystemVariable("$THICKNESS", 40)]
UNCOV
2883
                public double ThicknessDefault { get; set; } = 0.0d;
×
2884

2885
                /// <summary>
2886
                /// Sets the time zone for the sun in the drawing.
2887
                /// </summary>
2888
                /// <remarks>
2889
                /// 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.
2890
                /// <br/>
2891
                /// System variable TIMEZONE
2892
                /// </remarks>
2893
                [CadSystemVariable("$TIMEZONE", 70)]
UNCOV
2894
                public int TimeZone { get; set; } = 0;
×
2895

2896
                /// <summary>
2897
                /// Cumulative editing time for this drawing(see Special Handling of Date/Time Variables)
2898
                /// </summary>
2899
                /// <remarks>
2900
                /// System variable TDINDWG
2901
                /// </remarks>
2902
                [CadSystemVariable("$TDINDWG", 40)]
UNCOV
2903
                public TimeSpan TotalEditingTime { get; set; } = new TimeSpan();
×
2904

2905
                /// <summary>
2906
                /// Default trace width.
2907
                /// </summary>
2908
                /// <remarks>
2909
                /// System variable TRACEWID.
2910
                /// </remarks>
2911
                [CadSystemVariable("$TRACEWID", 40)]
UNCOV
2912
                public double TraceWidthDefault { get; set; }
×
2913

2914
                /// <summary>
2915
                /// Name of the UCS that defines the origin and orientation of orthographic UCS settings
2916
                /// </summary>
2917
                /// <remarks>
2918
                /// System variable UCSBASE
2919
                /// </remarks>
2920
                [CadSystemVariable("$UCSBASE", true, 2)]
2921
                public string UcsBaseName
2922
                {
2923
                        get { return this.ModelSpaceUcsBase.Name; }
×
2924
                        set
2925
                        {
×
2926
                                this.ModelSpaceUcsBase.Name = value;
×
2927
                        }
×
2928
                }
2929

2930
                /// <summary>
2931
                /// Name of current UCS
2932
                /// </summary>
2933
                /// <remarks>
2934
                /// System variable UCSNAME
2935
                /// </remarks>
2936
                [CadSystemVariable("$UCSNAME", true, 2)]
2937
                public string UcsName
2938
                {
2939
                        get { return this.ModelSpaceUcs.Name; }
×
2940
                        set
2941
                        {
×
2942
                                this.ModelSpaceUcs.Name = value;
×
2943
                        }
×
2944
                }
2945

2946
                /// <summary>
2947
                /// Controls the display format for units.
2948
                /// </summary>
2949
                /// <remarks>
2950
                /// System variable UNITMODE.
2951
                /// </remarks>
2952
                [CadSystemVariable("$UNITMODE", 70)]
UNCOV
2953
                public short UnitMode { get; set; } = 0;
×
2954

2955
                /// <summary>
2956
                /// Universal date/time the drawing was created(see Special Handling of Date/Time Variables).
2957
                /// </summary>
2958
                /// <remarks>
2959
                /// System variable TDUCREATE.
2960
                /// </remarks>
2961
                [CadSystemVariable("$TDUCREATE", 40)]
UNCOV
2962
                public DateTime UniversalCreateDateTime { get; set; } = DateTime.UtcNow;
×
2963

2964
                /// <summary>
2965
                /// Universal date/time of the last update/save(see Special Handling of Date/Time Variables).
2966
                /// </summary>
2967
                /// <remarks>
2968
                /// System variable TDUUPDATE.
2969
                /// </remarks>
2970
                [CadSystemVariable("$TDUUPDATE", 40)]
UNCOV
2971
                public DateTime UniversalUpdateDateTime { get; set; } = DateTime.UtcNow;
×
2972

2973
                /// <summary>
2974
                /// Local date/time of last drawing update(see Special Handling of Date/Time Variables).
2975
                /// </summary>
2976
                /// <remarks>
2977
                /// System variable TDUPDATE.
2978
                /// </remarks>
2979
                [CadSystemVariable("$TDUPDATE", 40)]
UNCOV
2980
                public DateTime UpdateDateTime { get; set; } = DateTime.Now;
×
2981

2982
                /// <summary>
2983
                /// System variable DIMSHO
2984
                /// </summary>
2985
                [CadSystemVariable("$DIMSHO", 70)]
UNCOV
2986
                public bool UpdateDimensionsWhileDragging { get; set; } = true;
×
2987

2988
                /// <summary>
2989
                /// Real variable intended for use by third-party developers.
2990
                /// </summary>
2991
                /// <remarks>
2992
                /// System variable USERR1.
2993
                /// </remarks>
2994
                [CadSystemVariable("$USERR1", 40)]
UNCOV
2995
                public double UserDouble1 { get; set; }
×
2996

2997
                /// <summary>
2998
                /// Real variable intended for use by third-party developers.
2999
                /// </summary>
3000
                /// <remarks>
3001
                /// System variable USERR2.
3002
                /// </remarks>
3003
                [CadSystemVariable("$USERR2", 40)]
UNCOV
3004
                public double UserDouble2 { get; set; }
×
3005

3006
                /// <summary>
3007
                /// Real variable intended for use by third-party developers.
3008
                /// </summary>
3009
                /// <remarks>
3010
                /// System variable USERR3.
3011
                /// </remarks>
3012
                [CadSystemVariable("$USERR3", 40)]
UNCOV
3013
                public double UserDouble3 { get; set; }
×
3014

3015
                /// <summary>
3016
                /// Real variable intended for use by third-party developers.
3017
                /// </summary>
3018
                /// <remarks>
3019
                /// System variable USERR4.
3020
                /// </remarks>
3021
                [CadSystemVariable("$USERR4", 40)]
UNCOV
3022
                public double UserDouble4 { get; set; }
×
3023

3024
                /// <summary>
3025
                /// Real variable intended for use by third-party developers.
3026
                /// </summary>
3027
                /// <remarks>
3028
                /// System variable USERR5.
3029
                /// </remarks>
3030
                [CadSystemVariable("$USERR5", 40)]
UNCOV
3031
                public double UserDouble5 { get; set; }
×
3032

3033
                /// <summary>
3034
                /// User-elapsed timer
3035
                /// </summary>
3036
                /// <remarks>
3037
                /// System variable TDUSRTIMER
3038
                /// </remarks>
3039
                [CadSystemVariable("$TDUSRTIMER", 40)]
UNCOV
3040
                public TimeSpan UserElapsedTimeSpan { get; set; }
×
3041

3042
                /// <summary>
3043
                /// Integer variable intended for use by third-party developers.
3044
                /// </summary>
3045
                /// <remarks>
3046
                /// System variable USERI1.
3047
                /// </remarks>
3048
                [CadSystemVariable("$USERI1", 70)]
UNCOV
3049
                public short UserShort1 { get; set; } = 0;
×
3050

3051
                /// <summary>
3052
                /// Integer variable intended for use by third-party developers.
3053
                /// </summary>
3054
                /// <remarks>
3055
                /// System variable USERI2.
3056
                /// </remarks>
3057
                [CadSystemVariable("$USERI2", 70)]
UNCOV
3058
                public short UserShort2 { get; set; } = 0;
×
3059

3060
                /// <summary>
3061
                /// Integer variable intended for use by third-party developers.
3062
                /// </summary>
3063
                /// <remarks>
3064
                /// System variable USERI3.
3065
                /// </remarks>
3066
                [CadSystemVariable("$USERI3", 70)]
UNCOV
3067
                public short UserShort3 { get; set; } = 0;
×
3068

3069
                /// <summary>
3070
                /// Integer variable intended for use by third-party developers.
3071
                /// </summary>
3072
                /// <remarks>
3073
                /// System variable USERI4.
3074
                /// </remarks>
3075
                [CadSystemVariable("$USERI4", 70)]
UNCOV
3076
                public short UserShort4 { get; set; } = 0;
×
3077

3078
                /// <summary>
3079
                /// Integer variable intended for use by third-party developers.
3080
                /// </summary>
3081
                /// <remarks>
3082
                /// System variable USERI5.
3083
                /// </remarks>
3084
                [CadSystemVariable("$USERI5", 70)]
UNCOV
3085
                public short UserShort5 { get; set; } = 0;
×
3086

3087
                /// <summary>
3088
                /// Controls the user timer for the drawing.
3089
                /// </summary>
3090
                /// <remarks>
3091
                /// System variable USRTIMER.
3092
                /// </remarks>
3093
                [CadSystemVariable("$USRTIMER", 70)]
UNCOV
3094
                public bool UserTimer { get; set; } = false;
×
3095

3096
                public ACadVersion Version
3097
                {
UNCOV
3098
                        get { return this._version; }
×
3099
                        set
UNCOV
3100
                        {
×
UNCOV
3101
                                this._version = value;
×
3102

3103
                                //Values are relevant for the dwgWriter, manually checked form dxf
UNCOV
3104
                                switch (value)
×
3105
                                {
3106
                                        case ACadVersion.AC1015:
UNCOV
3107
                                                this.MaintenanceVersion = 20;
×
UNCOV
3108
                                                break;
×
3109
                                        case ACadVersion.AC1018:
UNCOV
3110
                                                this.MaintenanceVersion = 104;
×
UNCOV
3111
                                                break;
×
3112
                                        case ACadVersion.AC1021:
UNCOV
3113
                                                this.MaintenanceVersion = 50;
×
UNCOV
3114
                                                break;
×
3115
                                        case ACadVersion.AC1024:
UNCOV
3116
                                                this.MaintenanceVersion = 226;
×
UNCOV
3117
                                                break;
×
3118
                                        case ACadVersion.AC1027:
UNCOV
3119
                                                this.MaintenanceVersion = 125;
×
UNCOV
3120
                                                break;
×
3121
                                        case ACadVersion.AC1032:
UNCOV
3122
                                                this.MaintenanceVersion = 228;
×
UNCOV
3123
                                                break;
×
3124
                                        default:
UNCOV
3125
                                                this.MaintenanceVersion = 0;
×
UNCOV
3126
                                                break;
×
3127
                                }
UNCOV
3128
                        }
×
3129
                }
3130

3131
                /// <summary>
3132
                /// Uniquely identifies a particular version of a drawing. Updated when the drawing is modified
3133
                /// </summary>
3134
                /// <remarks>
3135
                /// System variable VERSIONGUID
3136
                /// </remarks>
3137
                [CadSystemVariable("$VERSIONGUID", 2)]
UNCOV
3138
                public string VersionGuid { get; internal set; } = Guid.NewGuid().ToString();
×
3139

3140
                /// <summary>
3141
                /// The Drawing database version number.
3142
                /// </summary>
3143
                /// <remarks>
3144
                /// System variable ACADVER.
3145
                /// </remarks>
3146
                [CadSystemVariable("$ACADVER", DxfCode.Text)]
3147
                public string VersionString
3148
                {
UNCOV
3149
                        get { return this.Version.ToString(); }
×
3150
                        set
UNCOV
3151
                        {
×
UNCOV
3152
                                this.Version = CadUtils.GetVersionFromName(value);
×
UNCOV
3153
                        }
×
3154
                }
3155

3156
                /// <summary>
3157
                /// View scale factor for new viewports.
3158
                /// </summary>
3159
                /// <remarks>
3160
                /// System variable PSVPSCALE.
3161
                /// </remarks>
3162
                [CadSystemVariable("$PSVPSCALE", 40)]
UNCOV
3163
                public double ViewportDefaultViewScaleFactor { get; set; }
×
3164

3165
                /// <summary>
3166
                /// Determines whether input to the DVIEW and VPOINT commands is relative to the WCS (default) or the current UCS.
3167
                /// </summary>
3168
                /// <remarks>
3169
                /// System variable WORLDVIEW.
3170
                /// </remarks>
3171
                [CadSystemVariable("$WORLDVIEW", 70)]
UNCOV
3172
                public bool WorldView { get; set; } = true;
×
3173

3174
                /// <summary>
3175
                /// Controls whether the current drawing can be edited in-place when being referenced by another drawing
3176
                /// </summary>
3177
                /// <remarks>
3178
                /// System variable XEDIT
3179
                /// </remarks>
3180
                [CadSystemVariable("$XEDIT", 290)]
UNCOV
3181
                public bool XEdit { get; set; }
×
3182

3183
                /// <summary>
3184
                /// Undocumented
3185
                /// </summary>
3186
                /// <remarks>
3187
                /// System variable DIMSAV
3188
                /// </remarks>
UNCOV
3189
                internal bool DIMSAV { get; set; }
×
3190

3191
                //Create enum for variable
3192
                private static readonly PropertyExpression<CadHeader, CadSystemVariableAttribute> _propertyCache;
3193

UNCOV
3194
                private short _angularUnitPrecision = 0;
×
UNCOV
3195
                private Layer _currentLayer = Layer.Default;
×
UNCOV
3196
                private LineType _currentLineType = LineType.ByLayer;
×
UNCOV
3197
                private MLineStyle _currentMLineStyle = MLineStyle.Default;
×
UNCOV
3198
                private TextStyle _currentTextStyle = TextStyle.Default;
×
UNCOV
3199
                private DimensionStyle _dimensionStyleOverrides = new DimensionStyle("override");
×
UNCOV
3200
                private DimensionStyle _currentDimensionStyle = DimensionStyle.Default;
×
UNCOV
3201
                private TextStyle _dimensionTextStyle = TextStyle.Default;
×
UNCOV
3202
                private double _facetResolution = 0.5;
×
UNCOV
3203
                private short _linearUnitPrecision = 4;
×
UNCOV
3204
                private double _stepsPerSecond = 2.0d;
×
UNCOV
3205
                private short _surfaceIsolineCount = 4;
×
UNCOV
3206
                private short _textQuality = 50;
×
UNCOV
3207
                private ACadVersion _version = ACadVersion.AC1032;
×
3208

3209
                static CadHeader()
UNCOV
3210
                {
×
UNCOV
3211
                        _propertyCache = new PropertyExpression<CadHeader, CadSystemVariableAttribute>(
×
UNCOV
3212
                                (info, attribute) => attribute.Name);
×
UNCOV
3213
                }
×
3214

UNCOV
3215
                public CadHeader() : this(ACadVersion.AC1032)
×
UNCOV
3216
                {
×
UNCOV
3217
                }
×
3218

UNCOV
3219
                public CadHeader(CadDocument document) : this(ACadVersion.AC1032)
×
UNCOV
3220
                {
×
UNCOV
3221
                        this.Document = document;
×
UNCOV
3222
                }
×
3223

UNCOV
3224
                public CadHeader(ACadVersion version)
×
UNCOV
3225
                {
×
UNCOV
3226
                        this.Version = version;
×
UNCOV
3227
                }
×
3228

3229
                /// <summary>
3230
                /// Gets a map of all the system variables and it's codes
3231
                /// </summary>
3232
                /// <returns></returns>
3233
                public static Dictionary<string, CadSystemVariable> GetHeaderMap()
UNCOV
3234
                {
×
UNCOV
3235
                        Dictionary<string, CadSystemVariable> map = new Dictionary<string, CadSystemVariable>();
×
UNCOV
3236
                        foreach (PropertyInfo p in typeof(CadHeader).GetProperties())
×
UNCOV
3237
                        {
×
UNCOV
3238
                                CadSystemVariableAttribute att = p.GetCustomAttribute<CadSystemVariableAttribute>();
×
UNCOV
3239
                                if (att == null)
×
UNCOV
3240
                                        continue;
×
3241

UNCOV
3242
                                map.Add(att.Name, new CadSystemVariable(p));
×
UNCOV
3243
                        }
×
3244

UNCOV
3245
                        return map;
×
UNCOV
3246
                }
×
3247

3248
                public object GetValue(string systemvar)
3249
                {
×
3250
                        var prop = _propertyCache.GetProperty(systemvar);
×
3251
                        return prop.Getter(this);
×
3252
                }
×
3253

3254
                /// <summary>
3255
                /// Get the primitive values in each dxf code
3256
                /// </summary>
3257
                /// <param name="systemvar"></param>
3258
                /// <returns>dictionary with the codes and values</returns>
3259
                public Dictionary<DxfCode, object> GetValues(string systemvar)
3260
                {
×
3261
                        Dictionary<DxfCode, object> value = null;
×
3262

3263
                        foreach (PropertyInfo p in this.GetType().GetProperties())
×
3264
                        {
×
3265
                                CadSystemVariableAttribute att = p.GetCustomAttribute<CadSystemVariableAttribute>();
×
3266
                                if (att == null)
×
3267
                                        continue;
×
3268

3269
                                if (att.Name == systemvar)
×
3270
                                {
×
3271
                                        value = new Dictionary<DxfCode, object>();
×
3272

3273
                                        if (att.ValueCodes.Length == 1)
×
3274
                                        {
×
3275
                                                value.Add(att.ValueCodes[0], p.GetValue(this));
×
3276
                                        }
×
3277
                                        else
3278
                                        {
×
3279
                                                IVector vector = (IVector)p.GetValue(this);
×
3280
                                                for (int i = 0; i < vector.Dimension; i++)
×
3281
                                                {
×
3282
                                                        value.Add(att.ValueCodes[i], vector[i]);
×
3283
                                                }
×
3284
                                        }
×
3285

3286
                                        break;
×
3287
                                }
3288
                        }
×
3289

3290
                        return value;
×
3291
                }
×
3292

3293
                /// <summary>
3294
                /// Set a value of a system variable by name
3295
                /// </summary>
3296
                /// <param name="systemvar">name of the system var</param>
3297
                /// <param name="values">parameters for the constructor of the value</param>
3298
                public void SetValue(string systemvar, params object[] values)
UNCOV
3299
                {
×
UNCOV
3300
                        PropertyExpression<CadHeader, CadSystemVariableAttribute>.Prop prop = _propertyCache.GetProperty(systemvar);
×
3301

UNCOV
3302
                        ConstructorInfo constr = prop.Property.PropertyType.GetConstructor(values.Select(o => o.GetType()).ToArray());
×
3303

UNCOV
3304
                        if (prop.Property.PropertyType.IsEnum)
×
UNCOV
3305
                        {
×
UNCOV
3306
                                int v = Convert.ToInt32(values.First());
×
UNCOV
3307
                                prop.Setter(this, Enum.ToObject(prop.Property.PropertyType, v));
×
UNCOV
3308
                        }
×
UNCOV
3309
                        else if (prop.Property.PropertyType.IsEquivalentTo(typeof(DateTime)))
×
UNCOV
3310
                        {
×
UNCOV
3311
                                double jvalue = (double)values.First();
×
3312

UNCOV
3313
                                prop.Setter(this, CadUtils.FromJulianCalendar((double)values.First()));
×
UNCOV
3314
                        }
×
UNCOV
3315
                        else if (prop.Property.PropertyType.IsEquivalentTo(typeof(TimeSpan)))
×
UNCOV
3316
                        {
×
UNCOV
3317
                                double jvalue = (double)values.First();
×
3318

UNCOV
3319
                                prop.Setter(this, CadUtils.EditingTime((double)values.First()));
×
UNCOV
3320
                        }
×
UNCOV
3321
                        else if (constr == null)
×
UNCOV
3322
                        {
×
UNCOV
3323
                                if (prop.Attribute.IsName && values.First() is string name)
×
UNCOV
3324
                                {
×
UNCOV
3325
                                        if (!name.IsNullOrEmpty())
×
UNCOV
3326
                                        {
×
UNCOV
3327
                                                prop.Setter(this, Convert.ChangeType(values.First(), prop.Property.PropertyType));
×
UNCOV
3328
                                        }
×
UNCOV
3329
                                }
×
3330
                                else
UNCOV
3331
                                {
×
UNCOV
3332
                                        prop.Setter(this, Convert.ChangeType(values.First(), prop.Property.PropertyType));
×
UNCOV
3333
                                }
×
UNCOV
3334
                        }
×
3335
                        else
UNCOV
3336
                        {
×
UNCOV
3337
                                prop.Setter(this, Activator.CreateInstance(prop.Property.PropertyType, values));
×
UNCOV
3338
                        }
×
UNCOV
3339
                }
×
3340

3341
                /// <inheritdoc/>
3342
                public override string ToString()
3343
                {
×
3344
                        return $"{this.Version}";
×
3345
                }
×
3346
        }
3347
}
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