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

DomCR / ACadSharp / 11909672945

19 Nov 2024 09:06AM UTC coverage: 75.63% (-0.04%) from 75.668%
11909672945

Pull #490

github

web-flow
Merge 31132eb92 into d11de9fcb
Pull Request #490: Issue 474 header defaults

4941 of 7225 branches covered (68.39%)

Branch coverage included in aggregate %.

18 of 31 new or added lines in 1 file covered. (58.06%)

14 existing lines in 2 files now uncovered.

19778 of 25459 relevant lines covered (77.69%)

36036.5 hits per line

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

782
                private double _facetResolution = 0.5;
480✔
783

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1525
                /// <remarks>
1526
                /// System variable CAMERADISPLAY
1527
                /// </remarks>
1528
                public bool CameraDisplayObjects { get; set; }
85✔
1529
                public double StepsPerSecond { get; set; }
85✔
1530
                public double StepSize { get; set; }
85✔
1531
                public double Dw3DPrecision { get; set; }
85✔
1532
                public double LensLength { get; set; }
85✔
1533
                public double CameraHeight { get; set; }
85✔
1534
                public char SolidsRetainHistory { get; set; }
85✔
1535
                public char ShowSolidsHistory { get; set; }
85✔
1536
                public double SweptSolidWidth { get; set; }
85✔
1537
                public double SweptSolidHeight { get; set; }
85✔
1538
                public double DraftAngleFirstCrossSection { get; set; }
85✔
1539
                public double DraftAngleSecondCrossSection { get; set; }
85✔
1540
                public double DraftMagnitudeFirstCrossSection { get; set; }
85✔
1541
                public double DraftMagnitudeSecondCrossSection { get; set; }
85✔
1542
                public short SolidLoftedShape { get; set; }
85✔
1543
                public char LoftedObjectNormals { get; set; }
85✔
1544

1545
                /// <summary>
1546
                /// Specifies the latitude of the drawing model in decimal format
1547
                /// </summary>
1548
                /// <remarks>
1549
                /// System variable LATITUDE
1550
                /// </remarks>
1551
                [CadSystemVariable("$LATITUDE", 40)]
1552
                public double Latitude { get; set; } = 37.7950d;
653✔
1553

1554
                /// <summary>
1555
                /// Specifies the longitude of the drawing model in decimal format
1556
                /// </summary>
1557
                /// <remarks>
1558
                /// System variable LONGITUDE
1559
                /// </remarks>
1560
                [CadSystemVariable("$LONGITUDE", 40)]
1561
                public double Longitude { get; set; } = -122.394d;
653✔
1562

1563
                /// <remarks>
1564
                /// System variable NORTHDIRECTION
1565
                /// </remarks>
1566
                [CadSystemVariable("$NORTHDIRECTION", 40)]
1567
                public double NorthDirection { get; set; }
173✔
1568

1569
                /// <remarks>
1570
                /// System variable TIMEZONE
1571
                /// </remarks>
1572
                [CadSystemVariable("$TIMEZONE", 70)]
1573
                public int TimeZone { get; set; }
173✔
1574

1575
                public char DisplayLightGlyphs { get; set; }
85✔
1576

1577
                /// <remarks>
1578
                /// System variable DWFFRAME
1579
                /// </remarks>
1580
                [CadSystemVariable("$DWFFRAME", 280)]
1581
                public char DwgUnderlayFramesVisibility { get; set; }
173✔
1582

1583
                /// <remarks>
1584
                /// System variable DGNFRAME
1585
                /// </remarks>
1586
                [CadSystemVariable("$DGNFRAME", 280)]
1587
                public char DgnUnderlayFramesVisibility { get; set; }
173✔
1588

1589
                /// <summary>
1590
                /// Shadow mode for a 3D object
1591
                /// </summary>
1592
                /// <remarks>
1593
                /// System variable CSHADOW
1594
                /// </remarks>
1595
                [CadSystemVariable("$CSHADOW", 280)]
1596
                public ShadowMode ShadowMode { get; set; }
173✔
1597

1598
                /// <summary>
1599
                /// Location of the ground shadow plane. This is a Z axis ordinate
1600
                /// </summary>
1601
                /// <remarks>
1602
                /// System variable SHADOWPLANELOCATION
1603
                /// </remarks>
1604
                [CadSystemVariable("$SHADOWPLANELOCATION", 40)]
1605
                public double ShadowPlaneLocation { get; set; }
173✔
1606

1607
                public string StyleSheetName { get; set; }
128✔
1608

1609
                /// <summary>
1610
                /// Dimension text style
1611
                /// </summary>
1612
                /// <remarks>
1613
                /// System variable DIMTXSTY
1614
                /// </remarks>
1615
                [CadSystemVariable("$DIMTXSTY", true, 7)]
1616
                public string DimensionTextStyleName
1617
                {
1618
                        get { return this._dimensionTextStyle.Name; }
×
1619
                        set
1620
                        {
132✔
1621
                                if (this.Document != null)
132!
1622
                                {
×
1623
                                        this._dimensionTextStyle = this.Document.TextStyles[value];
×
1624
                                }
×
1625
                                else
1626
                                {
132✔
1627
                                        this._dimensionTextStyle = new TextStyle(value);
132✔
1628
                                }
132✔
1629
                        }
132✔
1630
                }
1631

1632
                /// <summary>
1633
                /// Dimension style name
1634
                /// </summary>
1635
                /// <remarks>
1636
                /// System variable DIMSTYLE
1637
                /// </remarks>
1638
                [CadSystemVariable("$DIMSTYLE", true, 2)]
1639
                public string DimensionStyleOverridesName
1640
                {
1641
                        get { return this._dimensionStyleOverrides.Name; }
6,078✔
1642
                        set
1643
                        {
166✔
1644
                                if (this.Document != null)
166!
1645
                                {
×
1646
                                        this._dimensionStyleOverrides = this.Document.DimensionStyles[value];
×
1647
                                }
×
1648
                                else
1649
                                {
166✔
1650
                                        this._dimensionStyleOverrides = new DimensionStyle(value);
166✔
1651
                                }
166✔
1652
                        }
166✔
1653
                }
1654

1655
                /// <summary>
1656
                /// Number of precision places displayed in angular dimensions
1657
                /// </summary>
1658
                /// <remarks>
1659
                /// System variable DIMADEC
1660
                /// </remarks>
1661
                [CadSystemVariable("$DIMADEC", 70)]
1662
                public short DimensionAngularDimensionDecimalPlaces
1663
                {
1664
                        get { return this.DimensionStyleOverrides.AngularDimensionDecimalPlaces; }
96✔
1665
                        set
1666
                        {
251✔
1667
                                this.DimensionStyleOverrides.AngularDimensionDecimalPlaces = value;
251✔
1668
                        }
251✔
1669
                }
1670

1671
                /// <summary>
1672
                /// Number of decimal places for the tolerance values of a primary units dimension
1673
                /// </summary>
1674
                /// <remarks>
1675
                /// System variable DIMDEC
1676
                /// </remarks>
1677
                [CadSystemVariable("$DIMDEC", 70)]
1678
                public short DimensionDecimalPlaces
1679
                {
1680
                        get { return this.DimensionStyleOverrides.DecimalPlaces; }
96✔
1681
                        set
1682
                        {
251✔
1683
                                this.DimensionStyleOverrides.DecimalPlaces = value;
251✔
1684
                        }
251✔
1685
                }
1686

1687
                /// <summary>
1688
                /// Number of decimal places to display the tolerance values
1689
                /// </summary>
1690
                /// <remarks>
1691
                /// System variable DIMTDEC
1692
                /// </remarks>
1693
                [CadSystemVariable("$DIMTDEC", 70)]
1694
                public short DimensionToleranceDecimalPlaces
1695
                {
1696
                        get { return this.DimensionStyleOverrides.ToleranceDecimalPlaces; }
96✔
1697
                        set
1698
                        {
251✔
1699
                                this.DimensionStyleOverrides.ToleranceDecimalPlaces = value;
251✔
1700
                        }
251✔
1701
                }
1702

1703
                /// <summary>
1704
                /// Alternate unit dimensioning performed if nonzero
1705
                /// </summary>
1706
                /// <remarks>
1707
                /// System variable DIMALT
1708
                /// </remarks>
1709
                [CadSystemVariable("$DIMALT", 70)]
1710
                public bool DimensionAlternateUnitDimensioning
1711
                {
1712
                        get { return this.DimensionStyleOverrides.AlternateUnitDimensioning; }
96✔
1713
                        set
1714
                        {
273✔
1715
                                this.DimensionStyleOverrides.AlternateUnitDimensioning = value;
273✔
1716
                        }
273✔
1717
                }
1718

1719
                /// <summary>
1720
                /// Units format for alternate units of all dimension style family members except angular
1721
                /// </summary>
1722
                /// <remarks>
1723
                /// System variable DIMALTU
1724
                /// </remarks>
1725
                [CadSystemVariable("$DIMALTU", 70)]
1726
                public LinearUnitFormat DimensionAlternateUnitFormat
1727
                {
1728
                        get { return this.DimensionStyleOverrides.AlternateUnitFormat; }
96✔
1729
                        set
1730
                        {
251✔
1731
                                this.DimensionStyleOverrides.AlternateUnitFormat = value;
251✔
1732
                        }
251✔
1733
                }
1734

1735
                /// <summary>
1736
                /// Alternate unit scale factor
1737
                /// </summary>
1738
                /// <remarks>
1739
                /// System variable DIMALTF
1740
                /// </remarks>
1741
                [CadSystemVariable("$DIMALTF", 40)]
1742
                public double DimensionAlternateUnitScaleFactor
1743
                {
1744
                        get { return this.DimensionStyleOverrides.AlternateUnitScaleFactor; }
96✔
1745
                        set
1746
                        {
273✔
1747
                                this.DimensionStyleOverrides.AlternateUnitScaleFactor = value;
273✔
1748
                        }
273✔
1749
                }
1750

1751
                /// <summary>
1752
                /// Extension line offset
1753
                /// </summary>
1754
                /// <remarks>
1755
                /// System variable DIMEXO
1756
                /// </remarks>
1757
                [CadSystemVariable("$DIMEXO", 40)]
1758
                public double DimensionExtensionLineOffset
1759
                {
1760
                        get { return this.DimensionStyleOverrides.ExtensionLineOffset; }
96✔
1761
                        set
1762
                        {
273✔
1763
                                this.DimensionStyleOverrides.ExtensionLineOffset = value;
273✔
1764
                        }
273✔
1765
                }
1766

1767
                /// <summary>
1768
                /// Overall dimensioning scale factor
1769
                /// </summary>
1770
                /// <remarks>
1771
                /// System variable DIMSCALE
1772
                /// </remarks>
1773
                [CadSystemVariable("$DIMSCALE", 40)]
1774
                public double DimensionScaleFactor
1775
                {
1776
                        get { return this.DimensionStyleOverrides.ScaleFactor; }
96✔
1777
                        set
1778
                        {
273✔
1779
                                this.DimensionStyleOverrides.ScaleFactor = value;
273✔
1780
                        }
273✔
1781
                }
1782

1783
                /// <summary>
1784
                /// Alternate unit decimal places
1785
                /// </summary>
1786
                /// <remarks>
1787
                /// System variable DIMALTD
1788
                /// </remarks>
1789
                [CadSystemVariable("$DIMALTD", 70)]
1790
                public short DimensionAlternateUnitDecimalPlaces
1791
                {
1792
                        get { return this.DimensionStyleOverrides.AlternateUnitDecimalPlaces; }
96✔
1793
                        set
1794
                        {
273✔
1795
                                this.DimensionStyleOverrides.AlternateUnitDecimalPlaces = value;
273✔
1796
                        }
273✔
1797
                }
1798

1799
                /// <summary>
1800
                /// Number of decimal places for tolerance values of an alternate units dimension
1801
                /// </summary>
1802
                /// <remarks>
1803
                /// System variable DIMALTTD
1804
                /// </remarks>
1805
                [CadSystemVariable("$DIMALTTD", 70)]
1806
                public short DimensionAlternateUnitToleranceDecimalPlaces
1807
                {
1808
                        get { return this.DimensionStyleOverrides.AlternateUnitToleranceDecimalPlaces; }
96✔
1809
                        set
1810
                        {
251✔
1811
                                this.DimensionStyleOverrides.AlternateUnitToleranceDecimalPlaces = value;
251✔
1812
                        }
251✔
1813
                }
1814

1815
                /// <summary>
1816
                /// Angle format for angular dimensions
1817
                /// </summary>
1818
                /// <remarks>
1819
                /// System variable DIMAUNIT
1820
                /// </remarks>
1821
                [CadSystemVariable("$DIMAUNIT", 70)]
1822
                public AngularUnitFormat DimensionAngularUnit
1823
                {
1824
                        get { return this.DimensionStyleOverrides.AngularUnit; }
81✔
1825
                        set
1826
                        {
233✔
1827
                                this.DimensionStyleOverrides.AngularUnit = value;
233✔
1828
                        }
233✔
1829
                }
1830

1831
                /// <summary>
1832
                /// Undocumented
1833
                /// </summary>
1834
                /// <remarks>
1835
                /// System variable DIMFRAC
1836
                /// </remarks>
1837
                [CadSystemVariable("$DIMFRAC", 70)]
1838
                public FractionFormat DimensionFractionFormat
1839
                {
1840
                        get { return this.DimensionStyleOverrides.FractionFormat; }
81✔
1841
                        set
1842
                        {
233✔
1843
                                this.DimensionStyleOverrides.FractionFormat = value;
233✔
1844
                        }
233✔
1845
                }
1846

1847
                /// <summary>
1848
                /// Sets units for all dimension types except Angular
1849
                /// </summary>
1850
                /// <remarks>
1851
                /// System variable DIMLUNIT
1852
                /// </remarks>
1853
                [CadSystemVariable("$DIMLUNIT", 70)]
1854
                public LinearUnitFormat DimensionLinearUnitFormat
1855
                {
1856
                        get { return this.DimensionStyleOverrides.LinearUnitFormat; }
81✔
1857
                        set
1858
                        {
233✔
1859
                                this.DimensionStyleOverrides.LinearUnitFormat = value;
233✔
1860
                        }
233✔
1861
                }
1862

1863
                /// <summary>
1864
                /// Single-character decimal separator used when creating dimensions whose unit format is decimal
1865
                /// </summary>
1866
                /// <remarks>
1867
                /// System variable DIMLUNIT
1868
                /// </remarks>
1869
                [CadSystemVariable("$DIMDSEP", 70)]
1870
                public char DimensionDecimalSeparator
1871
                {
1872
                        get { return this.DimensionStyleOverrides.DecimalSeparator; }
81✔
1873
                        set
1874
                        {
233✔
1875
                                this.DimensionStyleOverrides.DecimalSeparator = value;
233✔
1876
                        }
233✔
1877
                }
1878

1879
                /// <summary>
1880
                /// Dimension text movement rules decimal
1881
                /// </summary>
1882
                /// <remarks>
1883
                /// System variable DIMTMOVE
1884
                /// </remarks>
1885
                [CadSystemVariable("$DIMTMOVE", 70)]
1886
                public TextMovement DimensionTextMovement
1887
                {
1888
                        get { return this.DimensionStyleOverrides.TextMovement; }
81✔
1889
                        set
1890
                        {
233✔
1891
                                this.DimensionStyleOverrides.TextMovement = value;
233✔
1892
                        }
233✔
1893
                }
1894

1895
                /// <summary>
1896
                /// Horizontal dimension text position
1897
                /// </summary>
1898
                /// <remarks>
1899
                /// System variable DIMJUST
1900
                /// </remarks>
1901
                [CadSystemVariable("$DIMJUST", 70)]
1902
                public DimensionTextHorizontalAlignment DimensionTextHorizontalAlignment
1903
                {
1904
                        get { return this.DimensionStyleOverrides.TextHorizontalAlignment; }
96✔
1905
                        set
1906
                        {
251✔
1907
                                this.DimensionStyleOverrides.TextHorizontalAlignment = value;
251✔
1908
                        }
251✔
1909
                }
1910

1911
                /// <summary>
1912
                /// Suppression of first extension line
1913
                /// </summary>
1914
                /// <remarks>
1915
                /// System variable DIMSD1
1916
                /// </remarks>
1917
                [CadSystemVariable("$DIMSD1", 70)]
1918
                public bool DimensionSuppressFirstDimensionLine
1919
                {
1920
                        get { return this.DimensionStyleOverrides.SuppressFirstDimensionLine; }
15✔
1921
                        set
1922
                        {
150✔
1923
                                this.DimensionStyleOverrides.SuppressFirstDimensionLine = value;
150✔
1924
                        }
150✔
1925
                }
1926

1927
                /// <summary>
1928
                /// Suppression of second extension line
1929
                /// </summary>
1930
                /// <remarks>
1931
                /// System variable DIMSD2
1932
                /// </remarks>
1933
                [CadSystemVariable("$DIMSD2", 70)]
1934
                public bool DimensionSuppressSecondDimensionLine
1935
                {
1936
                        get { return this.DimensionStyleOverrides.SuppressSecondDimensionLine; }
15✔
1937
                        set
1938
                        {
150✔
1939
                                this.DimensionStyleOverrides.SuppressSecondDimensionLine = value;
150✔
1940
                        }
150✔
1941
                }
1942

1943
                /// <summary>
1944
                /// Vertical justification for tolerance values
1945
                /// </summary>
1946
                /// <remarks>
1947
                /// System variable DIMTOL
1948
                /// </remarks>
1949
                [CadSystemVariable("$DIMTOL", 70)]
1950
                public bool DimensionGenerateTolerances
1951
                {
1952
                        get { return this.DimensionStyleOverrides.GenerateTolerances; }
96✔
1953
                        set
1954
                        {
273✔
1955
                                this.DimensionStyleOverrides.GenerateTolerances = value;
273✔
1956
                        }
273✔
1957
                }
1958

1959
                /// <summary>
1960
                /// Vertical justification for tolerance values
1961
                /// </summary>
1962
                /// <remarks>
1963
                /// System variable DIMTOLJ
1964
                /// </remarks>
1965
                [CadSystemVariable("$DIMTOLJ", 70)]
1966
                public ToleranceAlignment DimensionToleranceAlignment
1967
                {
1968
                        get { return this.DimensionStyleOverrides.ToleranceAlignment; }
96✔
1969
                        set
1970
                        {
251✔
1971
                                this.DimensionStyleOverrides.ToleranceAlignment = value;
251✔
1972
                        }
251✔
1973
                }
1974

1975
                /// <summary>
1976
                /// Controls suppression of zeros for primary unit values
1977
                /// </summary>
1978
                /// <remarks>
1979
                /// System variable DIMZIN
1980
                /// </remarks>
1981
                [CadSystemVariable("$DIMZIN", 70)]
1982
                public ZeroHandling DimensionZeroHandling
1983
                {
1984
                        get { return this.DimensionStyleOverrides.ZeroHandling; }
96✔
1985
                        set
1986
                        {
273✔
1987
                                this.DimensionStyleOverrides.ZeroHandling = value;
273✔
1988
                        }
273✔
1989
                }
1990

1991
                /// <summary>
1992
                /// Controls suppression of zeros for tolerance values
1993
                /// </summary>
1994
                /// <remarks>
1995
                /// System variable DIMTZIN
1996
                /// </remarks>
1997
                [CadSystemVariable("$DIMTZIN", 70)]
1998
                public ZeroHandling DimensionToleranceZeroHandling
1999
                {
2000
                        get { return this.DimensionStyleOverrides.ToleranceZeroHandling; }
96✔
2001
                        set
2002
                        {
251✔
2003
                                this.DimensionStyleOverrides.ToleranceZeroHandling = value;
251✔
2004
                        }
251✔
2005
                }
2006

2007
                /// <remarks>
2008
                /// System variable DIMFIT
2009
                /// </remarks>
2010
                [CadSystemVariable("$DIMFIT", 70)]
2011
                public short DimensionFit
2012
                {
2013
                        get { return this.DimensionStyleOverrides.DimensionFit; }
15✔
2014
                        set
2015
                        {
18✔
2016
                                this.DimensionStyleOverrides.DimensionFit = value;
18✔
2017
                        }
18✔
2018
                }
2019

2020
                /// <summary>
2021
                /// Controls suppression of zeros for alternate unit dimension values
2022
                /// </summary>
2023
                /// <remarks>
2024
                /// System variable DIMALTZ
2025
                /// </remarks>
2026
                [CadSystemVariable("$DIMALTZ", 70)]
2027
                public ZeroHandling DimensionAlternateUnitZeroHandling
2028
                {
2029
                        get { return this.DimensionStyleOverrides.AlternateUnitZeroHandling; }
96✔
2030
                        set
2031
                        {
251✔
2032
                                this.DimensionStyleOverrides.AlternateUnitZeroHandling = value;
251✔
2033
                        }
251✔
2034
                }
2035

2036
                /// <summary>
2037
                /// Controls suppression of zeros for alternate tolerance values
2038
                /// </summary>
2039
                /// <remarks>
2040
                /// System variable DIMALTTZ
2041
                /// </remarks>
2042
                [CadSystemVariable("$DIMALTTZ", 70)]
2043
                public ZeroHandling DimensionAlternateUnitToleranceZeroHandling
2044
                {
2045
                        get { return this.DimensionStyleOverrides.AlternateUnitToleranceZeroHandling; }
96✔
2046
                        set
2047
                        {
251✔
2048
                                this.DimensionStyleOverrides.AlternateUnitToleranceZeroHandling = value;
251✔
2049
                        }
251✔
2050
                }
2051

2052
                /// <summary>
2053
                /// Cursor functionality for user-positioned text
2054
                /// </summary>
2055
                /// <remarks>
2056
                /// System variable DIMUPT
2057
                /// </remarks>
2058
                [CadSystemVariable("$DIMUPT", 70)]
2059
                public bool DimensionCursorUpdate
2060
                {
2061
                        get { return this.DimensionStyleOverrides.CursorUpdate; }
96✔
2062
                        set
2063
                        {
251✔
2064
                                this.DimensionStyleOverrides.CursorUpdate = value;
251✔
2065
                        }
251✔
2066
                }
2067

2068
                /// <summary>
2069
                /// Controls dimension text and arrow placement when space is not sufficient to place both within the extension lines
2070
                /// </summary>
2071
                /// <remarks>
2072
                /// System variable DIMATFIT
2073
                /// </remarks>
2074
                [CadSystemVariable("$DIMATFIT", 70)]
2075
                public TextArrowFitType DimensionDimensionTextArrowFit
2076
                {
2077
                        get { return this.DimensionStyleOverrides.DimensionTextArrowFit; }
81✔
2078
                        set
2079
                        {
233✔
2080
                                this.DimensionStyleOverrides.DimensionTextArrowFit = value;
233✔
2081
                        }
233✔
2082
                }
2083

2084
                /// <summary>
2085
                /// Determines rounding of alternate units
2086
                /// </summary>
2087
                /// <remarks>
2088
                /// System variable DIMALTRND
2089
                /// </remarks>
2090
                [CadSystemVariable("$DIMALTRND", 40)]
2091
                public double DimensionAlternateUnitRounding
2092
                {
2093
                        get { return this.DimensionStyleOverrides.AlternateUnitRounding; }
81✔
2094
                        set
2095
                        {
233✔
2096
                                this.DimensionStyleOverrides.AlternateUnitRounding = value;
233✔
2097
                        }
233✔
2098
                }
2099

2100
                /// <summary>
2101
                /// Alternate dimensioning suffix
2102
                /// </summary>
2103
                /// <remarks>
2104
                /// System variable DIMAPOST
2105
                /// </remarks>
2106
                [CadSystemVariable("$DIMAPOST", 1)]
2107
                public string DimensionAlternateDimensioningSuffix
2108
                {
2109
                        get { return this.DimensionStyleOverrides.AlternateDimensioningSuffix; }
96✔
2110
                        set
2111
                        {
273✔
2112
                                this.DimensionStyleOverrides.AlternateDimensioningSuffix = value;
273✔
2113
                        }
273✔
2114
                }
2115

2116
                /// <summary>
2117
                /// Dimensioning arrow size
2118
                /// </summary>
2119
                /// <remarks>
2120
                /// System variable DIMASZ
2121
                /// </remarks>
2122
                [CadSystemVariable("$DIMASZ", 40)]
2123
                public double DimensionArrowSize
2124
                {
2125
                        get { return this.DimensionStyleOverrides.ArrowSize; }
96✔
2126
                        set
2127
                        {
273✔
2128
                                this.DimensionStyleOverrides.ArrowSize = value;
273✔
2129
                        }
273✔
2130
                }
2131

2132
                /// <summary>
2133
                /// Controls suppression of zeros for angular dimensions
2134
                /// </summary>
2135
                /// <remarks>
2136
                /// System variable DIMAZIN
2137
                /// </remarks>
2138
                [CadSystemVariable("$DIMAZIN", 70)]
2139
                public ZeroHandling DimensionAngularZeroHandling
2140
                {
2141
                        get { return this.DimensionStyleOverrides.AngularZeroHandling; }
81✔
2142
                        set
2143
                        {
233✔
2144
                                this.DimensionStyleOverrides.AngularZeroHandling = value;
233✔
2145
                        }
233✔
2146
                }
2147

2148
                /// <summary>
2149
                /// Undocumented
2150
                /// </summary>
2151
                /// <remarks>
2152
                /// System variable DIMARCSYM
2153
                /// </remarks>
2154
                [CadSystemVariable("$DIMARCSYM", 70)]
2155
                public ArcLengthSymbolPosition DimensionArcLengthSymbolPosition
2156
                {
2157
                        get { return this.DimensionStyleOverrides.ArcLengthSymbolPosition; }
51✔
2158
                        set
2159
                        {
156✔
2160
                                this.DimensionStyleOverrides.ArcLengthSymbolPosition = value;
156✔
2161
                        }
156✔
2162
                }
2163

2164
                /// <summary>
2165
                /// Use separate arrow blocks if nonzero
2166
                /// </summary>
2167
                /// <remarks>
2168
                /// System variable DIMSAH
2169
                /// </remarks>
2170
                [CadSystemVariable("$DIMSAH", 70)]
2171
                public bool DimensionSeparateArrowBlocks
2172
                {
2173
                        get { return this.DimensionStyleOverrides.SeparateArrowBlocks; }
96✔
2174
                        set
2175
                        {
273✔
2176
                                this.DimensionStyleOverrides.SeparateArrowBlocks = value;
273✔
2177
                        }
273✔
2178
                }
2179

2180
                /// <summary>
2181
                /// Size of center mark/lines
2182
                /// </summary>
2183
                /// <remarks>
2184
                /// System variable DIMCEN
2185
                /// </remarks>
2186
                [CadSystemVariable("$DIMCEN", 40)]
2187
                public double DimensionCenterMarkSize
2188
                {
2189
                        get { return this.DimensionStyleOverrides.CenterMarkSize; }
96✔
2190
                        set
2191
                        {
273✔
2192
                                this.DimensionStyleOverrides.CenterMarkSize = value;
273✔
2193
                        }
273✔
2194
                }
2195

2196
                /// <summary>
2197
                /// Dimensioning tick size
2198
                /// </summary>
2199
                /// <remarks>
2200
                /// System variable DIMTSZ
2201
                /// </remarks>
2202
                [CadSystemVariable("$DIMTSZ", 40)]
2203
                public double DimensionTickSize
2204
                {
2205
                        get { return this.DimensionStyleOverrides.TickSize; }
96✔
2206
                        set
2207
                        {
273✔
2208
                                this.DimensionStyleOverrides.TickSize = value;
273✔
2209
                        }
273✔
2210
                }
2211

2212
                /// <summary>
2213
                /// Dimension line color
2214
                /// </summary>
2215
                /// <remarks>
2216
                /// System variable DIMCLRD
2217
                /// </remarks>
2218
                [CadSystemVariable("$DIMCLRD", 70)]
2219
                public Color DimensionLineColor
2220
                {
2221
                        get { return this.DimensionStyleOverrides.DimensionLineColor; }
96✔
2222
                        set
2223
                        {
273✔
2224
                                this.DimensionStyleOverrides.DimensionLineColor = value;
273✔
2225
                        }
273✔
2226
                }
2227

2228
                /// <summary>
2229
                /// Dimension extension line color
2230
                /// </summary>
2231
                /// <remarks>
2232
                /// System variable DIMCLRE
2233
                /// </remarks>
2234
                [CadSystemVariable("$DIMCLRE", 70)]
2235
                public Color DimensionExtensionLineColor
2236
                {
2237
                        get { return this.DimensionStyleOverrides.ExtensionLineColor; }
96✔
2238
                        set
2239
                        {
273✔
2240
                                this.DimensionStyleOverrides.ExtensionLineColor = value;
273✔
2241
                        }
273✔
2242
                }
2243

2244
                /// <summary>
2245
                /// Dimension text color
2246
                /// </summary>
2247
                /// <remarks>
2248
                /// System variable DIMCLRT
2249
                /// </remarks>
2250
                [CadSystemVariable("$DIMCLRT", 70)]
2251
                public Color DimensionTextColor
2252
                {
2253
                        get { return this.DimensionStyleOverrides.TextColor; }
96✔
2254
                        set
2255
                        {
273✔
2256
                                this.DimensionStyleOverrides.TextColor = value;
273✔
2257
                        }
273✔
2258
                }
2259

2260
                /// <summary>
2261
                /// Dimension line extension
2262
                /// </summary>
2263
                /// <remarks>
2264
                /// System variable DIMDLE
2265
                /// </remarks>
2266
                [CadSystemVariable("$DIMDLE", 40)]
2267
                public double DimensionLineExtension
2268
                {
2269
                        get { return this.DimensionStyleOverrides.DimensionLineExtension; }
96✔
2270
                        set
2271
                        {
273✔
2272
                                this.DimensionStyleOverrides.DimensionLineExtension = value;
273✔
2273
                        }
273✔
2274
                }
2275

2276
                /// <summary>
2277
                /// Dimension line increment
2278
                /// </summary>
2279
                /// <remarks>
2280
                /// System variable DIMDLI
2281
                /// </remarks>
2282
                [CadSystemVariable("$DIMDLI", 40)]
2283
                public double DimensionLineIncrement
2284
                {
2285
                        get { return this.DimensionStyleOverrides.DimensionLineIncrement; }
96✔
2286
                        set
2287
                        {
273✔
2288
                                this.DimensionStyleOverrides.DimensionLineIncrement = value;
273✔
2289
                        }
273✔
2290
                }
2291

2292
                /// <summary>
2293
                /// Extension line extension
2294
                /// </summary>
2295
                /// <remarks>
2296
                /// System variable DIMEXE
2297
                /// </remarks>
2298
                [CadSystemVariable("$DIMEXE", 40)]
2299
                public double DimensionExtensionLineExtension
2300
                {
2301
                        get { return this.DimensionStyleOverrides.ExtensionLineExtension; }
96✔
2302
                        set
2303
                        {
273✔
2304
                                this.DimensionStyleOverrides.ExtensionLineExtension = value;
273✔
2305
                        }
273✔
2306
                }
2307

2308
                /// <summary>
2309
                /// Undocumented
2310
                /// </summary>
2311
                /// <remarks>
2312
                /// System variable DIMFXLON
2313
                /// </remarks>
2314
                [CadSystemVariable("$DIMFXLON", 70)]
2315
                public bool DimensionIsExtensionLineLengthFixed
2316
                {
2317
                        get { return this.DimensionStyleOverrides.IsExtensionLineLengthFixed; }
51✔
2318
                        set
2319
                        {
156✔
2320
                                this.DimensionStyleOverrides.IsExtensionLineLengthFixed = value;
156✔
2321
                        }
156✔
2322
                }
2323

2324
                /// <summary>
2325
                /// Undocumented
2326
                /// </summary>
2327
                /// <remarks>
2328
                /// System variable DIMFXL
2329
                /// </remarks>
2330
                [CadSystemVariable("$DIMFXL", 40)]
2331
                public double DimensionFixedExtensionLineLength
2332
                {
2333
                        get { return this.DimensionStyleOverrides.FixedExtensionLineLength; }
51✔
2334
                        set
2335
                        {
156✔
2336
                                this.DimensionStyleOverrides.FixedExtensionLineLength = value;
156✔
2337
                        }
156✔
2338
                }
2339

2340
                /// <summary>
2341
                /// Undocumented
2342
                /// </summary>
2343
                /// <remarks>
2344
                /// System variable DIMJOGANG
2345
                /// </remarks>
2346
                [CadSystemVariable("$DIMJOGANG", 40)]
2347
                public double DimensionJoggedRadiusDimensionTransverseSegmentAngle
2348
                {
2349
                        get { return this.DimensionStyleOverrides.JoggedRadiusDimensionTransverseSegmentAngle; }
51✔
2350
                        set
2351
                        {
156✔
2352
                                this.DimensionStyleOverrides.JoggedRadiusDimensionTransverseSegmentAngle = value;
156✔
2353
                        }
156✔
2354
                }
2355

2356
                /// <summary>
2357
                /// Undocumented
2358
                /// </summary>
2359
                /// <remarks>
2360
                /// System variable DIMTFILL
2361
                /// </remarks>
2362
                [CadSystemVariable("$DIMTFILL", 70)]
2363
                public DimensionTextBackgroundFillMode DimensionTextBackgroundFillMode
2364
                {
2365
                        get { return this.DimensionStyleOverrides.TextBackgroundFillMode; }
51✔
2366
                        set
2367
                        {
156✔
2368
                                this.DimensionStyleOverrides.TextBackgroundFillMode = value;
156✔
2369
                        }
156✔
2370
                }
2371

2372
                /// <summary>
2373
                /// Undocumented
2374
                /// </summary>
2375
                /// <remarks>
2376
                /// System variable DIMTFILLCLR
2377
                /// </remarks>
2378
                [CadSystemVariable(DxfReferenceType.Ignored, "$DIMTFILLCLR", 62)]
2379
                public Color DimensionTextBackgroundColor
2380
                {
2381
                        get { return this.DimensionStyleOverrides.TextBackgroundColor; }
51✔
2382
                        set
2383
                        {
156✔
2384
                                this.DimensionStyleOverrides.TextBackgroundColor = value;
156✔
2385
                        }
156✔
2386
                }
2387

2388
                /// <summary>
2389
                /// Undocumented
2390
                /// </summary>
2391
                /// <remarks>
2392
                /// System variable DIMGAP
2393
                /// </remarks>
2394
                [CadSystemVariable("$DIMGAP", 40)]
2395
                public double DimensionLineGap
2396
                {
2397
                        get { return this.DimensionStyleOverrides.DimensionLineGap; }
96✔
2398
                        set
2399
                        {
273✔
2400
                                this.DimensionStyleOverrides.DimensionLineGap = value;
273✔
2401
                        }
273✔
2402
                }
2403

2404
                /// <summary>
2405
                /// Linear measurements scale factor
2406
                /// </summary>
2407
                /// <remarks>
2408
                /// System variable DIMLFAC
2409
                /// </remarks>
2410
                [CadSystemVariable("$DIMLFAC", 40)]
2411
                public double DimensionLinearScaleFactor
2412
                {
2413
                        get { return this.DimensionStyleOverrides.LinearScaleFactor; }
96✔
2414
                        set
2415
                        {
273✔
2416
                                this.DimensionStyleOverrides.LinearScaleFactor = value;
273✔
2417
                        }
273✔
2418
                }
2419

2420
                /// <summary>
2421
                /// Text vertical position
2422
                /// </summary>
2423
                /// <remarks>
2424
                /// System variable DIMTVP
2425
                /// </remarks>
2426
                [CadSystemVariable("$DIMTVP", 40)]
2427
                public double DimensionTextVerticalPosition
2428
                {
2429
                        get { return this.DimensionStyleOverrides.TextVerticalPosition; }
96✔
2430
                        set
2431
                        {
273✔
2432
                                this.DimensionStyleOverrides.TextVerticalPosition = value;
273✔
2433
                        }
273✔
2434
                }
2435

2436
                /// <summary>
2437
                /// Dimension line lineweight
2438
                /// </summary>
2439
                /// <remarks>
2440
                /// System variable DIMLWD
2441
                /// </remarks>
2442
                [CadSystemVariable("$DIMLWD", 70)]
2443
                public LineweightType DimensionLineWeight
2444
                {
2445
                        get { return this.DimensionStyleOverrides.DimensionLineWeight; }
81✔
2446
                        set
2447
                        {
233✔
2448
                                this.DimensionStyleOverrides.DimensionLineWeight = value;
233✔
2449
                        }
233✔
2450
                }
2451

2452
                /// <summary>
2453
                /// Extension line lineweight
2454
                /// </summary>
2455
                /// <remarks>
2456
                /// System variable DIMLWE
2457
                /// </remarks>
2458
                [CadSystemVariable("$DIMLWE", 70)]
2459
                public LineweightType ExtensionLineWeight
2460
                {
2461
                        get { return this.DimensionStyleOverrides.ExtensionLineWeight; }
81✔
2462
                        set
2463
                        {
233✔
2464
                                this.DimensionStyleOverrides.ExtensionLineWeight = value;
233✔
2465
                        }
233✔
2466
                }
2467

2468
                /// <summary>
2469
                /// Undocumented
2470
                /// </summary>
2471
                /// <remarks>
2472
                /// System variable DIMPOST
2473
                /// </remarks>
2474
                [CadSystemVariable("$DIMPOST", 1)]
2475
                public string DimensionPostFix
2476
                {
2477
                        get { return this.DimensionStyleOverrides.PostFix; }
96✔
2478
                        set
2479
                        {
273✔
2480
                                this.DimensionStyleOverrides.PostFix = value;
273✔
2481
                        }
273✔
2482
                }
2483

2484
                /// <summary>
2485
                /// Rounding value for dimension distances
2486
                /// </summary>
2487
                /// <remarks>
2488
                /// System variable DIMRND
2489
                /// </remarks>
2490
                [CadSystemVariable("$DIMRND", 40)]
2491
                public double DimensionRounding
2492
                {
2493
                        get { return this.DimensionStyleOverrides.Rounding; }
96✔
2494
                        set
2495
                        {
273✔
2496
                                this.DimensionStyleOverrides.Rounding = value;
273✔
2497
                        }
273✔
2498
                }
2499

2500
                /// <summary>
2501
                /// First extension line suppressed if nonzero
2502
                /// </summary>
2503
                /// <remarks>
2504
                /// System variable DIMSE1
2505
                /// </remarks>
2506
                [CadSystemVariable("$DIMSE1", 70)]
2507
                public bool DimensionSuppressFirstExtensionLine
2508
                {
2509
                        get { return this.DimensionStyleOverrides.SuppressFirstExtensionLine; }
177✔
2510
                        set
2511
                        {
374✔
2512
                                this.DimensionStyleOverrides.SuppressFirstExtensionLine = value;
374✔
2513
                        }
374✔
2514
                }
2515

2516
                /// <summary>
2517
                /// Second extension line suppressed if nonzero
2518
                /// </summary>
2519
                /// <remarks>
2520
                /// System variable DIMSE2
2521
                /// </remarks>
2522
                [CadSystemVariable("$DIMSE2", 70)]
2523
                public bool DimensionSuppressSecondExtensionLine
2524
                {
2525
                        get { return this.DimensionStyleOverrides.SuppressSecondExtensionLine; }
177✔
2526
                        set
2527
                        {
374✔
2528
                                this.DimensionStyleOverrides.SuppressSecondExtensionLine = value;
374✔
2529
                        }
374✔
2530
                }
2531

2532
                /// <summary>
2533
                /// Suppress outside-extensions dimension lines if nonzero
2534
                /// </summary>
2535
                /// <remarks>
2536
                /// System variable DIMSOXD
2537
                /// </remarks>
2538
                [CadSystemVariable("$DIMSOXD", 70)]
2539
                public bool DimensionSuppressOutsideExtensions
2540
                {
2541
                        get { return this.DimensionStyleOverrides.SuppressOutsideExtensions; }
96✔
2542
                        set
2543
                        {
273✔
2544
                                this.DimensionStyleOverrides.SuppressOutsideExtensions = value;
273✔
2545
                        }
273✔
2546
                }
2547

2548
                /// <summary>
2549
                /// Text above dimension line if nonzero
2550
                /// </summary>
2551
                /// <remarks>
2552
                /// System variable DIMTAD
2553
                /// </remarks>
2554
                [CadSystemVariable("$DIMTAD", 70)]
2555
                public DimensionTextVerticalAlignment DimensionTextVerticalAlignment
2556
                {
2557
                        get { return this.DimensionStyleOverrides.TextVerticalAlignment; }
96✔
2558
                        set
2559
                        {
273✔
2560
                                this.DimensionStyleOverrides.TextVerticalAlignment = value;
273✔
2561
                        }
273✔
2562
                }
2563

2564
                /// <summary>
2565
                /// Controls suppression of zeros for alternate unit dimension values
2566
                /// </summary>
2567
                /// <remarks>
2568
                /// System variable DIMUNIT
2569
                /// </remarks>
2570
                [CadSystemVariable("$DIMUNIT", 70)]
2571
                public short DimensionUnit
2572
                {
2573
                        get { return this.DimensionStyleOverrides.DimensionUnit; }
15✔
2574
                        set
2575
                        {
18✔
2576
                                this.DimensionStyleOverrides.DimensionUnit = value;
18✔
2577
                        }
18✔
2578
                }
2579

2580
                /// <summary>
2581
                /// Dimension tolerance display scale factor
2582
                /// </summary>
2583
                /// <remarks>
2584
                /// System variable DIMTFAC
2585
                /// </remarks>
2586
                [CadSystemVariable("$DIMTFAC", 40)]
2587
                public double DimensionToleranceScaleFactor
2588
                {
2589
                        get { return this.DimensionStyleOverrides.ToleranceScaleFactor; }
96✔
2590
                        set
2591
                        {
273✔
2592
                                this.DimensionStyleOverrides.ToleranceScaleFactor = value;
273✔
2593
                        }
273✔
2594
                }
2595

2596
                /// <summary>
2597
                /// Text inside horizontal if nonzero
2598
                /// </summary>
2599
                /// <remarks>
2600
                /// System variable DIMTIH
2601
                /// </remarks>
2602
                [CadSystemVariable("$DIMTIH", 70)]
2603
                public bool DimensionTextInsideHorizontal
2604
                {
2605
                        get { return this.DimensionStyleOverrides.TextInsideHorizontal; }
96✔
2606
                        set
2607
                        {
273✔
2608
                                this.DimensionStyleOverrides.TextInsideHorizontal = value;
273✔
2609
                        }
273✔
2610
                }
2611

2612
                /// <summary>
2613
                /// Force text inside extensions if nonzero
2614
                /// </summary>
2615
                /// <remarks>
2616
                /// System variable DIMTIX
2617
                /// </remarks>
2618
                [CadSystemVariable("$DIMTIX", 70)]
2619
                public bool DimensionTextInsideExtensions
2620
                {
2621
                        get { return this.DimensionStyleOverrides.TextInsideExtensions; }
96✔
2622
                        set
2623
                        {
273✔
2624
                                this.DimensionStyleOverrides.TextInsideExtensions = value;
273✔
2625
                        }
273✔
2626
                }
2627

2628
                /// <summary>
2629
                /// Minus tolerance
2630
                /// </summary>
2631
                /// <remarks>
2632
                /// System variable DIMTM
2633
                /// </remarks>
2634
                [CadSystemVariable("$DIMTM", 40)]
2635
                public double DimensionMinusTolerance
2636
                {
2637
                        get { return this.DimensionStyleOverrides.MinusTolerance; }
96✔
2638
                        set
2639
                        {
273✔
2640
                                this.DimensionStyleOverrides.MinusTolerance = value;
273✔
2641
                        }
273✔
2642
                }
2643

2644
                /// <summary>
2645
                /// If text is outside the extension lines, dimension lines are forced between the extension lines if nonzero
2646
                /// </summary>
2647
                /// <remarks>
2648
                /// System variable DIMTOFL
2649
                /// </remarks>
2650
                [CadSystemVariable("$DIMTOFL", 70)]
2651
                public bool DimensionTextOutsideExtensions
2652
                {
2653
                        get { return this.DimensionStyleOverrides.TextOutsideExtensions; }
96✔
2654
                        set
2655
                        {
273✔
2656
                                this.DimensionStyleOverrides.TextOutsideExtensions = value;
273✔
2657
                        }
273✔
2658
                }
2659

2660
                /// <summary>
2661
                /// Text outside horizontal if nonzero
2662
                /// </summary>
2663
                /// <remarks>
2664
                /// System variable DIMTOH
2665
                /// </remarks>
2666
                [CadSystemVariable("$DIMTOH", 70)]
2667
                public bool DimensionTextOutsideHorizontal
2668
                {
2669
                        get { return this.DimensionStyleOverrides.TextOutsideHorizontal; }
96✔
2670
                        set
2671
                        {
273✔
2672
                                this.DimensionStyleOverrides.TextOutsideHorizontal = value;
273✔
2673
                        }
273✔
2674
                }
2675

2676
                /// <summary>
2677
                /// Dimension limits generated if nonzero
2678
                /// </summary>
2679
                /// <remarks>
2680
                /// System variable DIMLIM
2681
                /// </remarks>
2682
                [CadSystemVariable("$DIMLIM", 70)]
2683
                public bool DimensionLimitsGeneration
2684
                {
2685
                        get { return this.DimensionStyleOverrides.LimitsGeneration; }
96✔
2686
                        set
2687
                        {
273✔
2688
                                this.DimensionStyleOverrides.LimitsGeneration = value;
273✔
2689
                        }
273✔
2690
                }
2691

2692
                /// <summary>
2693
                /// Plus tolerance
2694
                /// </summary>
2695
                /// <remarks>
2696
                /// System variable DIMTP
2697
                /// </remarks>
2698
                [CadSystemVariable("$DIMTP", 40)]
2699
                public double DimensionPlusTolerance
2700
                {
2701
                        get { return this.DimensionStyleOverrides.PlusTolerance; }
96✔
2702
                        set
2703
                        {
273✔
2704
                                this.DimensionStyleOverrides.PlusTolerance = value;
273✔
2705
                        }
273✔
2706
                }
2707

2708
                /// <summary>
2709
                /// Dimensioning text height
2710
                /// </summary>
2711
                /// <remarks>
2712
                /// System variable DIMTXT
2713
                /// </remarks>
2714
                [CadSystemVariable("$DIMTXT", 40)]
2715
                public double DimensionTextHeight
2716
                {
2717
                        get { return this.DimensionStyleOverrides.TextHeight; }
96✔
2718
                        set
2719
                        {
273✔
2720
                                this.DimensionStyleOverrides.TextHeight = value;
273✔
2721
                        }
273✔
2722
                }
2723

2724
                /// <summary>
2725
                /// Undocumented
2726
                /// </summary>
2727
                /// <remarks>
2728
                /// System variable DIMTXTDIRECTION
2729
                /// </remarks>
2730
                [CadSystemVariable("$DIMTXTDIRECTION", 70)]
2731
                public TextDirection DimensionTextDirection
2732
                {
2733
                        get { return this.DimensionStyleOverrides.TextDirection; }
48✔
2734
                        set
2735
                        {
120✔
2736
                                this.DimensionStyleOverrides.TextDirection = value;
120✔
2737
                        }
120✔
2738
                }
2739

2740
                /// <summary>
2741
                /// Undocumented
2742
                /// </summary>
2743
                /// <remarks>
2744
                /// System variable DIMALTMZF
2745
                /// </remarks>
2746
                [CadSystemVariable("$DIMALTMZF", 40)]
2747
                public double DimensionAltMzf
2748
                {
2749
                        get { return this.DimensionStyleOverrides.AltMzf; }
48✔
2750
                        set
2751
                        {
54✔
2752
                                this.DimensionStyleOverrides.AltMzf = value;
54✔
2753
                        }
54✔
2754
                }
2755

2756
                /// <summary>
2757
                /// Undocumented
2758
                /// </summary>
2759
                /// <remarks>
2760
                /// System variable DIMALTMZS
2761
                /// </remarks>
2762
                [CadSystemVariable("$DIMALTMZS", 6)]
2763
                public string DimensionAltMzs
2764
                {
2765
                        get { return this.DimensionStyleOverrides.AltMzs; }
48✔
2766
                        set
2767
                        {
54✔
2768
                                this.DimensionStyleOverrides.AltMzs = value;
54✔
2769
                        }
54✔
2770
                }
2771

2772
                /// <summary>
2773
                /// Undocumented
2774
                /// </summary>
2775
                /// <remarks>
2776
                /// System variable DIMMZF
2777
                /// </remarks>
2778
                [CadSystemVariable("$DIMMZF", 40)]
2779
                public double DimensionMzf
2780
                {
2781
                        get { return this.DimensionStyleOverrides.Mzf; }
48✔
2782
                        set
2783
                        {
54✔
2784
                                this.DimensionStyleOverrides.Mzf = value;
54✔
2785
                        }
54✔
2786
                }
2787

2788
                /// <summary>
2789
                /// Undocumented
2790
                /// </summary>
2791
                /// <remarks>
2792
                /// System variable DIMMZS
2793
                /// </remarks>
2794
                [CadSystemVariable("$DIMMZS", 6)]
2795
                public string DimensionMzs
2796
                {
2797
                        get { return this.DimensionStyleOverrides.Mzs; }
48✔
2798
                        set
2799
                        {
54✔
2800
                                this.DimensionStyleOverrides.Mzs = value;
54✔
2801
                        }
54✔
2802
                }
2803

2804
                /// <summary>
2805
                /// Undocumented
2806
                /// </summary>
2807
                /// <remarks>
2808
                /// System variable DIMLTYPE
2809
                /// </remarks>
2810
                [CadSystemVariable("$DIMLTYPE", 6)]
2811
                public string DimensionLineType { get; set; } = "ByBlock";
568✔
2812

2813
                /// <summary>
2814
                /// Undocumented
2815
                /// </summary>
2816
                /// <remarks>
2817
                /// System variable DIMLTEX1
2818
                /// </remarks>
2819
                [CadSystemVariable("$DIMLTEX1", 6)]
2820
                public string DimensionTex1 { get; set; } = "ByBlock";
568✔
2821

2822
                /// <summary>
2823
                /// Undocumented
2824
                /// </summary>
2825
                /// <remarks>
2826
                /// System variable DIMLTEX2
2827
                /// </remarks>
2828
                [CadSystemVariable("$DIMLTEX2", 6)]
2829
                public string DimensionTex2 { get; set; } = "ByBlock";
568✔
2830

2831
                public Layer CurrentLayer
2832
                {
2833
                        get
2834
                        {
42✔
2835
                                if (this.Document == null)
42✔
2836
                                {
7✔
2837
                                        return this._currentLayer;
7✔
2838
                                }
2839
                                else
2840
                                {
35✔
2841
                                        return this.Document.Layers[this.CurrentLayerName];
35✔
2842
                                }
2843
                        }
42✔
2844
                        private set
2845
                        {
×
2846
                                this._currentLayer = value;
×
2847
                        }
×
2848
                }
2849

2850
                public LineType CurrentLineType
2851
                {
2852
                        get
2853
                        {
32✔
2854
                                if (this.Document == null)
32✔
2855
                                {
2✔
2856
                                        return this._currentLineType;
2✔
2857
                                }
2858
                                else
2859
                                {
30✔
2860
                                        return this.Document.LineTypes[this.CurrentLineTypeName];
30✔
2861
                                }
2862
                        }
32✔
2863
                        private set
2864
                        {
×
2865
                                _currentLineType = value;
×
2866
                        }
×
2867
                }
2868

2869
                public TextStyle CurrentTextStyle
2870
                {
2871
                        get
2872
                        {
37✔
2873
                                if (this.Document == null)
37✔
2874
                                {
2✔
2875
                                        return this._currentTextStyle;
2✔
2876
                                }
2877
                                else
2878
                                {
35✔
2879
                                        return this.Document.TextStyles[this.TextStyleName];
35✔
2880
                                }
2881
                        }
37✔
2882
                        private set
2883
                        {
×
2884
                                this._currentTextStyle = value;
×
2885
                        }
×
2886
                }
2887

2888
                public TextStyle DimensionTextStyle
2889
                {
2890
                        get
2891
                        {
×
2892
                                if (this.Document == null)
×
2893
                                {
×
2894
                                        return this._dimensionTextStyle;
×
2895
                                }
2896
                                else
2897
                                {
×
2898
                                        return this.Document.TextStyles[this.DimensionTextStyleName];
×
2899
                                }
2900
                        }
×
2901
                        private set
2902
                        {
×
2903
                                this._dimensionTextStyle = value;
×
2904
                        }
×
2905
                }
2906

2907
                public DimensionStyle DimensionStyleOverrides
2908
                {
2909
                        get
2910
                        {
18,796✔
2911
                                if (this.Document == null)
18,796✔
2912
                                {
16,860✔
2913
                                        return this._dimensionStyleOverrides;
16,860✔
2914
                                }
2915
                                else
2916
                                {
1,936✔
2917
                                        return this.Document.DimensionStyles[this.DimensionStyleOverridesName];
1,936✔
2918
                                }
2919
                        }
18,796✔
2920
                        private set
2921
                        {
×
2922
                                this._dimensionStyleOverrides = value;
×
2923
                        }
×
2924
                }
2925

2926
                public MLineStyle CurrentMLineStyle
2927
                {
2928
                        get
NEW
2929
                        {
×
NEW
2930
                                if (this.Document == null)
×
NEW
2931
                                {
×
NEW
2932
                                        return this._currentMLineStyle;
×
2933
                                }
2934
                                else
NEW
2935
                                {
×
NEW
2936
                                        return this.Document.MLineStyles[this.MultiLineStyleName];
×
2937
                                }
NEW
2938
                        }
×
2939
                        private set
NEW
2940
                        {
×
NEW
2941
                                this._currentMLineStyle = value;
×
NEW
2942
                        }
×
2943
                }
2944

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

2948
                public UCS ModelSpaceUcsBase { get; private set; } = new UCS();
480✔
2949

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

2952
                public UCS PaperSpaceUcsBase { get; private set; } = new UCS();
480✔
2953

2954
                /// <summary>
2955
                /// Document where this header resides
2956
                /// </summary>
2957
                public CadDocument Document { get; internal set; }
22,061✔
2958

2959
                private readonly static PropertyExpression<CadHeader, CadSystemVariableAttribute> _propertyCache;
2960

2961
                private Layer _currentLayer = Layer.Default;
480✔
2962

2963
                private TextStyle _currentTextStyle = TextStyle.Default;
480✔
2964

2965
                private TextStyle _dimensionTextStyle = TextStyle.Default;
480✔
2966

2967
                private DimensionStyle _dimensionStyleOverrides = DimensionStyle.Default;
480✔
2968

2969
                private LineType _currentLineType = LineType.ByLayer;
480✔
2970

2971
                private MLineStyle _currentMLineStyle = MLineStyle.Default;
480✔
2972

2973
                static CadHeader()
2974
                {
1✔
2975
                        _propertyCache = new PropertyExpression<CadHeader, CadSystemVariableAttribute>(
1✔
2976
                                (info, attribute) => attribute.Name);
230✔
2977
                }
1✔
2978

2979
                public CadHeader() : this(ACadVersion.AC1018) { }
906✔
2980

2981
                public CadHeader(CadDocument document) : this(ACadVersion.AC1018)
178✔
2982
                {
178✔
2983
                        this.Document = document;
178✔
2984
                }
178✔
2985

2986
                public CadHeader(ACadVersion version)
480✔
2987
                {
480✔
2988
                        this.Version = version;
480✔
2989
                }
480✔
2990

2991
                /// <summary>
2992
                /// Gets a map of all the system variables and it's codes
2993
                /// </summary>
2994
                /// <returns></returns>
2995
                public static Dictionary<string, CadSystemVariable> GetHeaderMap()
2996
                {
211✔
2997
                        Dictionary<string, CadSystemVariable> map = new Dictionary<string, CadSystemVariable>();
211✔
2998
                        foreach (PropertyInfo p in typeof(CadHeader).GetProperties())
114,151✔
2999
                        {
56,759✔
3000
                                CadSystemVariableAttribute att = p.GetCustomAttribute<CadSystemVariableAttribute>();
56,759✔
3001
                                if (att == null)
56,759✔
3002
                                        continue;
8,440✔
3003

3004
                                map.Add(att.Name, new CadSystemVariable(p));
48,319✔
3005
                        }
48,319✔
3006

3007
                        return map;
211✔
3008
                }
211✔
3009

3010
                /// <summary>
3011
                /// Set a valueo of a system variable by name
3012
                /// </summary>
3013
                /// <param name="systemvar">name of the system var</param>
3014
                /// <param name="values">parameters for the constructor of the value</param>
3015
                public void SetValue(string systemvar, params object[] values)
3016
                {
31,312✔
3017
                        PropertyExpression<CadHeader, CadSystemVariableAttribute>.Prop prop = _propertyCache.GetProperty(systemvar);
31,312✔
3018

3019
                        ConstructorInfo constr = prop.Property.PropertyType.GetConstructor(values.Select(o => o.GetType()).ToArray());
70,084✔
3020

3021
                        if (prop.Property.PropertyType.IsEnum)
31,312✔
3022
                        {
4,650✔
3023
                                int v = Convert.ToInt32(values.First());
4,650✔
3024
                                prop.Setter(this, Enum.ToObject(prop.Property.PropertyType, v));
4,650✔
3025
                        }
4,650✔
3026
                        else if (prop.Property.PropertyType.IsEquivalentTo(typeof(DateTime)))
26,662✔
3027
                        {
620✔
3028
                                double jvalue = (double)values.First();
620✔
3029

3030
                                prop.Setter(this, CadUtils.FromJulianCalendar((double)values.First()));
620✔
3031
                        }
620✔
3032
                        else if (prop.Property.PropertyType.IsEquivalentTo(typeof(TimeSpan)))
26,042✔
3033
                        {
320✔
3034
                                double jvalue = (double)values.First();
320✔
3035

3036
                                prop.Setter(this, CadUtils.EditingTime((double)values.First()));
320✔
3037
                        }
320✔
3038
                        else if (constr == null)
25,722✔
3039
                        {
20,880✔
3040
                                if (prop.Attribute.IsName && values.First() is string name)
20,880✔
3041
                                {
1,512✔
3042
                                        if (!name.IsNullOrEmpty())
1,512✔
3043
                                        {
940✔
3044
                                                prop.Setter(this, Convert.ChangeType(values.First(), prop.Property.PropertyType));
940✔
3045
                                        }
940✔
3046
                                }
1,512✔
3047
                                else
3048
                                {
19,368✔
3049
                                        prop.Setter(this, Convert.ChangeType(values.First(), prop.Property.PropertyType));
19,368✔
3050
                                }
19,368✔
3051
                        }
20,880✔
3052
                        else
3053
                        {
4,842✔
3054
                                prop.Setter(this, Activator.CreateInstance(prop.Property.PropertyType, values));
4,842✔
3055
                        }
4,842✔
3056
                }
31,312✔
3057

3058
                public object GetValue(string systemvar)
3059
                {
×
3060
                        var prop = _propertyCache.GetProperty(systemvar);
×
3061
                        return prop.Getter(this);
×
3062
                }
×
3063

3064
                /// <summary>
3065
                /// Get the primitive values in each dxf code
3066
                /// </summary>
3067
                /// <param name="systemvar"></param>
3068
                /// <returns>dictionary with the codes and values</returns>
3069
                public Dictionary<DxfCode, object> GetValues(string systemvar)
3070
                {
×
3071
                        Dictionary<DxfCode, object> value = null;
×
3072

3073
                        foreach (PropertyInfo p in this.GetType().GetProperties())
×
3074
                        {
×
3075
                                CadSystemVariableAttribute att = p.GetCustomAttribute<CadSystemVariableAttribute>();
×
3076
                                if (att == null)
×
3077
                                        continue;
×
3078

3079
                                if (att.Name == systemvar)
×
3080
                                {
×
3081
                                        value = new Dictionary<DxfCode, object>();
×
3082

3083
                                        if (att.ValueCodes.Length == 1)
×
3084
                                        {
×
3085
                                                value.Add(att.ValueCodes[0], p.GetValue(this));
×
3086
                                        }
×
3087
                                        else
3088
                                        {
×
3089
                                                IVector vector = (IVector)p.GetValue(this);
×
3090
                                                for (int i = 0; i < vector.Dimension; i++)
×
3091
                                                {
×
3092
                                                        value.Add(att.ValueCodes[i], vector[i]);
×
3093
                                                }
×
3094
                                        }
×
3095

3096
                                        break;
×
3097
                                }
3098
                        }
×
3099

3100
                        return value;
×
3101
                }
×
3102
        }
3103
}
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