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

DomCR / ACadSharp / 12008475829

25 Nov 2024 10:52AM UTC coverage: 75.339% (-0.3%) from 75.668%
12008475829

push

github

web-flow
Merge pull request #494 from DomCR/Issue-487_DBCOLOR

Issue 487 dbcolor

4956 of 7275 branches covered (68.12%)

Branch coverage included in aggregate %.

116 of 206 new or added lines in 21 files covered. (56.31%)

91 existing lines in 11 files now uncovered.

19811 of 25599 relevant lines covered (77.39%)

36312.43 hits per line

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

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

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

32
                public ACadVersion Version { get; set; } = ACadVersion.AC1018;
20,124✔
33

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

591
                /// <summary>
592
                /// Current multiline style name
593
                /// </summary>
594
                /// <remarks>
595
                /// System variable CMLSTYLE
596
                /// </remarks>
597
                [CadSystemVariable("$CMLSTYLE", true, 2)]
598
                public string MultiLineStyleName { get; internal set; } = "Standard";
738✔
599

600
                //TODO: Header MLStyle
601
                //{
602
                //        get { return this.CurrentLType.Name; }
603
                //        set
604
                //        {
605
                //                if (this.Document != null)
606
                //                {
607
                //                        this.CurrentLType = this.Document.LineTypes[value];
608
                //                }
609
                //                else
610
                //                {
611
                //                        this.CurrentLType = new LineType(value);
612
                //                }
613
                //        }
614
                //}
615

616
                //public MLStyle CurrentTextStyle { get; private set; } = MLStyle.Default;
617

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

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

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

645
                /// <summary>
646
                /// Current thickness set by ELEV command
647
                /// </summary>
648
                /// <remarks>
649
                /// System variable THICKNESS
650
                /// </remarks>
651
                [CadSystemVariable("$THICKNESS", 40)]
652
                public double ThicknessDefault { get; set; }
317✔
653

654
                /// <summary>
655
                /// Angle 0 direction
656
                /// </summary>
657
                /// <remarks>
658
                /// System variable ANGBASE
659
                /// </remarks>
660
                [CadSystemVariable("$ANGBASE", 50)]
661
                public double AngleBase { get; set; } = 0.0;
913✔
662

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

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

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

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

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

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

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

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

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

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

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

762
                /// <summary>
763
                /// 
764
                /// </summary>
765
                /// <remarks>
766
                /// System variable FACETRES
767
                /// </remarks>
768
                public double FacetResolution { get; set; }
153✔
769

770
                /// <summary>
771
                /// Current multiline scale
772
                /// </summary>
773
                /// <remarks>
774
                /// System variable CMLSCALE
775
                /// </remarks>
776
                [CadSystemVariable("$CMLSCALE", 40)]
777
                public double CurrentMultilineScale { get; set; } = 20.0d;
891✔
778

779
                /// <summary>
780
                /// Current entity linetype scale
781
                /// </summary>
782
                /// <remarks>
783
                /// System variable CHAMFERD
784
                /// </remarks>
785
                [CadSystemVariable("$CELTSCALE", 40)]
786
                public double CurrentEntityLinetypeScale { get; set; } = 1.0d;
891✔
787

788
                /// <summary>
789
                /// Name of menu file
790
                /// </summary>
791
                /// <remarks>
792
                /// System variable MENU
793
                /// </remarks>
794
                [CadSystemVariable("$MENU", 1)]
795
                public string MenuFileName { get; set; } = ".";
811✔
796

797
                /// <summary>
798
                /// Next available handle
799
                /// </summary>
800
                /// <remarks>
801
                /// System variable HANDSEED
802
                /// </remarks>
803
                [CadSystemVariable("$HANDSEED", 5)]
804
                public ulong HandleSeed { get; internal set; } = 0x0;
32,838✔
805

806
                /// <summary>
807
                /// Local date/time of drawing creation (see Special Handling of Date/Time Variables)
808
                /// </summary>
809
                /// <remarks>
810
                /// System variable TDCREATE
811
                /// </remarks>
812
                [CadSystemVariable("$TDCREATE", 40)]
813
                public DateTime CreateDateTime { get; set; } = DateTime.Now;
935✔
814

815
                /// <summary>
816
                /// Universal date/time the drawing was created(see Special Handling of Date/Time Variables)
817
                /// </summary>
818
                /// <remarks>
819
                /// System variable TDUCREATE
820
                /// </remarks>
821
                [CadSystemVariable("$TDUCREATE", 40)]
822
                public DateTime UniversalCreateDateTime { get; set; } = DateTime.UtcNow;
738✔
823

824
                /// <summary>
825
                /// Local date/time of last drawing update(see Special Handling of Date/Time Variables)
826
                /// </summary>
827
                /// <remarks>
828
                /// System variable TDUPDATE
829
                /// </remarks>
830
                [CadSystemVariable("$TDUPDATE", 40)]
831
                public DateTime UpdateDateTime { get; set; } = DateTime.Now;
938✔
832

833
                /// <summary>
834
                /// Universal date/time of the last update/save(see Special Handling of Date/Time Variables)
835
                /// </summary>
836
                /// <remarks>
837
                /// System variable TDUUPDATE
838
                /// </remarks>
839
                [CadSystemVariable("$TDUUPDATE", 40)]
840
                public DateTime UniversalUpdateDateTime { get; set; } = DateTime.UtcNow;
757✔
841

842
                /// <summary>
843
                /// Cumulative editing time for this drawing(see Special Handling of Date/Time Variables)
844
                /// </summary>
845
                /// <remarks>
846
                /// System variable TDINDWG
847
                /// </remarks>
848
                [CadSystemVariable("$TDINDWG", 40)]
849
                public TimeSpan TotalEditingTime { get; set; } = new TimeSpan();
913✔
850

851
                /// <summary>
852
                /// User-elapsed timer
853
                /// </summary>
854
                /// <remarks>
855
                /// System variable TDUSRTIMER
856
                /// </remarks>
857
                [CadSystemVariable("$TDUSRTIMER", 40)]
858
                public TimeSpan UserElapsedTimeSpan { get; set; }
317✔
859

860
                /// <summary>
861
                /// Current entity color number
862
                /// </summary>
863
                /// <remarks>
864
                /// System variable CECOLOR
865
                /// </remarks>
866
                [CadSystemVariable("$CECOLOR", 62)]
867
                public Color CurrentEntityColor { get; set; } = Color.ByLayer;
915✔
868

869
                /// <summary>
870
                /// View scale factor for new viewports
871
                /// </summary>
872
                /// <remarks>
873
                /// System variable PSVPSCALE
874
                /// </remarks>
875
                [CadSystemVariable("$PSVPSCALE", 40)]
876
                public double ViewportDefaultViewScaleFactor { get; set; }
272✔
877

878
                /// <summary>
879
                /// Insertion base set by BASE command(in WCS)
880
                /// </summary>
881
                /// <remarks>
882
                /// System variable PINSBASE
883
                /// </remarks>
884
                [CadSystemVariable("$PINSBASE", 10, 20, 30)]
885
                public XYZ PaperSpaceInsertionBase { get; set; } = XYZ.Zero;
789✔
886

887
                /// <summary>
888
                /// X, Y, and Z drawing extents lower-left corner (in WCS)
889
                /// </summary>
890
                /// <remarks>
891
                /// System variable PEXTMIN
892
                /// </remarks>
893
                [CadSystemVariable("$PEXTMIN", 10, 20, 30)]
894
                public XYZ PaperSpaceExtMin { get; set; }
317✔
895

896
                /// <summary>
897
                /// X, Y, and Z drawing extents upper-right corner(in WCS)
898
                /// </summary>
899
                /// <remarks>
900
                /// System variable PEXTMAX
901
                /// </remarks>
902
                [CadSystemVariable("$PEXTMAX", 10, 20, 30)]
903
                public XYZ PaperSpaceExtMax { get; set; }
317✔
904

905
                /// <summary>
906
                /// XY drawing limits lower-left corner(in WCS)
907
                /// </summary>
908
                /// <remarks>
909
                /// System variable PLIMMIN
910
                /// </remarks>
911
                [CadSystemVariable("$PLIMMIN", 10, 20)]
912
                public XY PaperSpaceLimitsMin { get; set; }
317✔
913

914
                /// <summary>
915
                /// XY drawing limits upper-right corner (in WCS)
916
                /// </summary>
917
                /// <remarks>
918
                /// System variable PLIMMAX
919
                /// </remarks>
920
                [CadSystemVariable("$PLIMMAX", 10, 20)]
921
                public XY PaperSpaceLimitsMax { get; set; }
317✔
922

923
                /// <summary>
924
                /// Current elevation set by ELEV command
925
                /// </summary>
926
                /// <remarks>
927
                /// System variable PELEVATION
928
                /// </remarks>
929
                [CadSystemVariable("$PELEVATION", 40)]
930
                public double PaperSpaceElevation
931
                {
932
                        get { return this.PaperSpaceUcs.Elevation; }
90✔
933
                        set
934
                        {
287✔
935
                                this.PaperSpaceUcs.Elevation = value;
287✔
936
                        }
287✔
937
                }
938

939
                /// <summary>
940
                /// Name of the UCS that defines the origin and orientation of orthographic UCS settings (paper space only)
941
                /// </summary>
942
                /// <remarks>
943
                /// System variable PUCSBASE
944
                /// </remarks>
945
                [CadSystemVariable("$PUCSBASE", true, 2)]
946
                public string PaperSpaceBaseName
947
                {
948
                        get { return this.PaperSpaceUcsBase.Name; }
×
949
                        set
950
                        {
×
951
                                this.PaperSpaceUcsBase.Name = value;
×
952
                        }
×
953
                }
954

955
                /// <summary>
956
                /// Current paper space UCS name
957
                /// </summary>
958
                /// <remarks>
959
                /// System variable PUCSNAME
960
                /// </remarks>
961
                [CadSystemVariable("$PUCSNAME", true, 2)]
962
                public string PaperSpaceName
963
                {
964
                        get { return this.PaperSpaceUcs.Name; }
×
965
                        set
966
                        {
×
967
                                this.PaperSpaceUcs.Name = value;
×
968
                        }
×
969
                }
970

971
                /// <summary>
972
                /// Origin of current UCS (in WCS)
973
                /// </summary>
974
                /// <remarks>
975
                /// System variable PUCSORG
976
                /// </remarks>
977
                [CadSystemVariable("$PUCSORG", 10, 20, 30)]
978
                public XYZ PaperSpaceUcsOrigin
979
                {
980
                        get { return this.PaperSpaceUcs.Origin; }
90✔
981
                        set
982
                        {
287✔
983
                                this.PaperSpaceUcs.Origin = value;
287✔
984
                        }
287✔
985
                }
986

987
                /// <summary>
988
                /// Direction of the current UCS X axis (in WCS)
989
                /// </summary>
990
                /// <remarks>
991
                /// System variable PUCSXDIR
992
                /// </remarks>
993
                [CadSystemVariable("$PUCSXDIR", 10, 20, 30)]
994
                public XYZ PaperSpaceUcsXAxis
995
                {
996
                        get { return this.PaperSpaceUcs.XAxis; }
90✔
997
                        set
998
                        {
287✔
999
                                this.PaperSpaceUcs.XAxis = value;
287✔
1000
                        }
287✔
1001
                }
1002

1003
                /// <summary>
1004
                /// Direction of the current UCS Y aYis (in WCS)
1005
                /// </summary>
1006
                /// <remarks>
1007
                /// System variable PUCSYDIR
1008
                /// </remarks>
1009
                [CadSystemVariable("$PUCSYDIR", 10, 20, 30)]
1010
                public XYZ PaperSpaceUcsYAxis
1011
                {
1012
                        get { return this.PaperSpaceUcs.YAxis; }
90✔
1013
                        set
1014
                        {
287✔
1015
                                this.PaperSpaceUcs.YAxis = value;
287✔
1016
                        }
287✔
1017
                }
1018

1019
                /// <summary>
1020
                /// Point which becomes the new UCS origin after changing paper space UCS to TOP when PUCSBASE is set to WORLD
1021
                /// </summary>
1022
                /// <remarks>
1023
                /// System variable PUCSORGTOP
1024
                /// </remarks>
1025
                [CadSystemVariable("$PUCSORGTOP", 10, 20, 30)]
1026
                public XYZ PaperSpaceOrthographicTopDOrigin { get; set; }
272✔
1027

1028
                /// <summary>
1029
                /// Point which becomes the new UCS origin after changing paper space UCS to BOTTOM when PUCSBASE is set to WORLD
1030
                /// </summary>
1031
                /// <remarks>
1032
                /// System variable PUCSORGBOTTOM
1033
                /// </remarks>
1034
                [CadSystemVariable("$PUCSORGBOTTOM", 10, 20, 30)]
1035
                public XYZ PaperSpaceOrthographicBottomDOrigin { get; set; }
272✔
1036

1037
                /// <summary>
1038
                /// Point which becomes the new UCS origin after changing paper space UCS to LEFT when PUCSBASE is set to WORLD
1039
                /// </summary>
1040
                /// <remarks>
1041
                /// System variable PUCSORGLEFT
1042
                /// </remarks>
1043
                [CadSystemVariable("$PUCSORGLEFT", 10, 20, 30)]
1044
                public XYZ PaperSpaceOrthographicLeftDOrigin { get; set; }
272✔
1045

1046
                /// <summary>
1047
                /// Point which becomes the new UCS origin after changing paper space UCS to RIGHT when PUCSBASE is set to WORLD
1048
                /// </summary>
1049
                /// <remarks>
1050
                /// System variable PUCSORGRIGHT
1051
                /// </remarks>
1052
                [CadSystemVariable("$PUCSORGRIGHT", 10, 20, 30)]
1053
                public XYZ PaperSpaceOrthographicRightDOrigin { get; set; }
272✔
1054

1055
                /// <summary>
1056
                /// Point which becomes the new UCS origin after changing paper space UCS to FRONT when PUCSBASE is set to WORLD
1057
                /// </summary>
1058
                /// <remarks>
1059
                /// System variable PUCSORGFRONT
1060
                /// </remarks>
1061
                [CadSystemVariable("$PUCSORGFRONT", 10, 20, 30)]
1062
                public XYZ PaperSpaceOrthographicFrontDOrigin { get; set; }
272✔
1063

1064
                /// <summary>
1065
                /// Point which becomes the new UCS origin after changing paper space UCS to BACK when PUCSBASE is set to WORLD
1066
                /// </summary>
1067
                /// <remarks>
1068
                /// System variable PUCSORGBACK
1069
                /// </remarks>
1070
                [CadSystemVariable("$PUCSORGBACK", 10, 20, 30)]
1071
                public XYZ PaperSpaceOrthographicBackDOrigin { get; set; }
272✔
1072

1073
                /// <summary>
1074
                /// Point which becomes the new UCS origin after changing model space UCS to TOP when PUCSBASE is set to WORLD
1075
                /// </summary>
1076
                /// <remarks>
1077
                /// System variable UCSORGTOP
1078
                /// </remarks>
1079
                [CadSystemVariable("$UCSORGTOP", 10, 20, 30)]
1080
                public XYZ ModelSpaceOrthographicTopDOrigin { get; set; }
272✔
1081

1082
                /// <summary>
1083
                /// Point which becomes the new UCS origin after changing model space UCS to BOTTOM when PUCSBASE is set to WORLD
1084
                /// </summary>
1085
                /// <remarks>
1086
                /// System variable UCSORGBOTTOM
1087
                /// </remarks>
1088
                [CadSystemVariable("$UCSORGBOTTOM", 10, 20, 30)]
1089
                public XYZ ModelSpaceOrthographicBottomDOrigin { get; set; }
272✔
1090

1091
                /// <summary>
1092
                /// Point which becomes the new UCS origin after changing model space UCS to LEFT when PUCSBASE is set to WORLD
1093
                /// </summary>
1094
                /// <remarks>
1095
                /// System variable UCSORGLEFT
1096
                /// </remarks>
1097
                [CadSystemVariable("$UCSORGLEFT", 10, 20, 30)]
1098
                public XYZ ModelSpaceOrthographicLeftDOrigin { get; set; }
272✔
1099

1100
                /// <summary>
1101
                /// Point which becomes the new UCS origin after changing model space UCS to RIGHT when PUCSBASE is set to WORLD
1102
                /// </summary>
1103
                /// <remarks>
1104
                /// System variable UCSORGRIGHT
1105
                /// </remarks>
1106
                [CadSystemVariable("$UCSORGRIGHT", 10, 20, 30)]
1107
                public XYZ ModelSpaceOrthographicRightDOrigin { get; set; }
272✔
1108

1109
                /// <summary>
1110
                /// Point which becomes the new UCS origin after changing model space UCS to FRONT when PUCSBASE is set to WORLD
1111
                /// </summary>
1112
                /// <remarks>
1113
                /// System variable UCSORGFRONT
1114
                /// </remarks>
1115
                [CadSystemVariable("$UCSORGFRONT", 10, 20, 30)]
1116
                public XYZ ModelSpaceOrthographicFrontDOrigin { get; set; }
272✔
1117

1118
                /// <summary>
1119
                /// Point which becomes the new UCS origin after changing model space UCS to BACK when PUCSBASE is set to WORLD
1120
                /// </summary>
1121
                /// <remarks>
1122
                /// System variable UCSORGBACK
1123
                /// </remarks>
1124
                [CadSystemVariable("$UCSORGBACK", 10, 20, 30)]
1125
                public XYZ ModelSpaceOrthographicBackDOrigin { get; set; }
272✔
1126

1127
                /// <summary>
1128
                /// Insertion base set by BASE command(in WCS)
1129
                /// </summary>
1130
                /// <remarks>
1131
                /// System variable INSBASE
1132
                /// </remarks>
1133
                [CadSystemVariable("$INSBASE", 10, 20, 30)]
1134
                public XYZ ModelSpaceInsertionBase { get; set; } = XYZ.Zero;
1,003✔
1135

1136
                /// <summary>
1137
                /// X, Y, and Z drawing extents lower-left corner (in WCS)
1138
                /// </summary>
1139
                /// <remarks>
1140
                /// System variable EXTMIN
1141
                /// </remarks>
1142
                [CadSystemVariable("$EXTMIN", 10, 20, 30)]
1143
                public XYZ ModelSpaceExtMin { get; set; }
317✔
1144

1145
                /// <summary>
1146
                /// X, Y, and Z drawing extents upper-right corner(in WCS)
1147
                /// </summary>
1148
                /// <remarks>
1149
                /// System variable EXTMAX
1150
                /// </remarks>
1151
                [CadSystemVariable("$EXTMAX", 10, 20, 30)]
1152
                public XYZ ModelSpaceExtMax { get; set; }
317✔
1153

1154
                /// <summary>
1155
                /// XY drawing limits lower-left corner (in WCS)
1156
                /// </summary>
1157
                /// <remarks>
1158
                /// System variable LIMMIN
1159
                /// </remarks>
1160
                [CadSystemVariable("$LIMMIN", 10, 20)]
1161
                public XY ModelSpaceLimitsMin { get; set; }
317✔
1162

1163
                /// <summary>
1164
                /// XY drawing limits upper-right corner (in WCS)
1165
                /// </summary>
1166
                /// <remarks>
1167
                /// System variable LIMMAX
1168
                /// </remarks>
1169
                [CadSystemVariable("$LIMMAX", 10, 20)]
1170
                public XY ModelSpaceLimitsMax { get; set; }
317✔
1171

1172
                /// <summary>
1173
                /// Name of the UCS that defines the origin and orientation of orthographic UCS settings
1174
                /// </summary>
1175
                /// <remarks>
1176
                /// System variable UCSBASE
1177
                /// </remarks>
1178
                [CadSystemVariable("$UCSBASE", true, 2)]
1179
                public string UcsBaseName
1180
                {
1181
                        get { return this.ModelSpaceUcsBase.Name; }
×
1182
                        set
1183
                        {
×
1184
                                this.ModelSpaceUcsBase.Name = value;
×
1185
                        }
×
1186
                }
1187

1188
                /// <summary>
1189
                /// Name of current UCS
1190
                /// </summary>
1191
                /// <remarks>
1192
                /// System variable UCSNAME
1193
                /// </remarks>
1194
                [CadSystemVariable("$UCSNAME", true, 2)]
1195
                public string UcsName
1196
                {
1197
                        get { return this.ModelSpaceUcs.Name; }
×
1198
                        set
1199
                        {
×
1200
                                this.ModelSpaceUcs.Name = value;
×
1201
                        }
×
1202
                }
1203

1204
                /// <summary>
1205
                /// Current elevation set by ELEV command
1206
                /// </summary>
1207
                /// <remarks>
1208
                /// System variable ELEVATION
1209
                /// </remarks>
1210
                [CadSystemVariable("$ELEVATION", 40)]
1211
                public double Elevation
1212
                {
1213
                        get { return this.ModelSpaceUcs.Elevation; }
90✔
1214
                        set
1215
                        {
287✔
1216
                                this.ModelSpaceUcs.Elevation = value;
287✔
1217
                        }
287✔
1218
                }
1219

1220
                /// <summary>
1221
                /// Origin of current UCS(in WCS)
1222
                /// </summary>
1223
                /// <remarks>
1224
                /// System variable UCSORG
1225
                /// </remarks>
1226
                [CadSystemVariable("$UCSORG", 10, 20, 30)]
1227
                public XYZ ModelSpaceOrigin
1228
                {
1229
                        get { return this.ModelSpaceUcs.Origin; }
90✔
1230
                        set
1231
                        {
287✔
1232
                                this.ModelSpaceUcs.Origin = value;
287✔
1233
                        }
287✔
1234
                }
1235

1236
                /// <summary>
1237
                /// Direction of the current UCS X axis (in WCS)
1238
                /// </summary>
1239
                /// <remarks>
1240
                /// System variable UCSXDIR
1241
                /// </remarks>
1242
                [CadSystemVariable("$UCSXDIR", 10, 20, 30)]
1243
                public XYZ ModelSpaceXAxis
1244
                {
1245
                        get { return this.ModelSpaceUcs.XAxis; }
90✔
1246
                        set
1247
                        {
287✔
1248
                                this.ModelSpaceUcs.XAxis = value;
287✔
1249
                        }
287✔
1250
                }
1251

1252
                /// <summary>
1253
                /// Direction of the current UCS Y axis (in WCS)
1254
                /// </summary>
1255
                /// <remarks>
1256
                /// System variable UCSYDIR
1257
                /// </remarks>
1258
                [CadSystemVariable("$UCSYDIR", 10, 20, 30)]
1259
                public XYZ ModelSpaceYAxis
1260
                {
1261
                        get { return this.ModelSpaceUcs.YAxis; }
90✔
1262
                        set
1263
                        {
287✔
1264
                                this.ModelSpaceUcs.YAxis = value;
287✔
1265
                        }
287✔
1266
                }
1267

1268
                /// <summary>
1269
                /// Arrow block name
1270
                /// </summary>
1271
                /// <remarks>
1272
                /// System variable DIMBLK
1273
                /// </remarks>
1274
                [CadSystemVariable("$DIMBLK", 1)]
1275
                public string DimensionBlockName { get; set; } = string.Empty;
681✔
1276

1277
                /// <summary>
1278
                /// Arrow block name for leaders
1279
                /// </summary>
1280
                /// <remarks>
1281
                /// System variable DIMLDRBLK
1282
                /// </remarks>
1283
                [CadSystemVariable("$DIMLDRBLK", 1)]
1284
                public string ArrowBlockName { get; set; } = string.Empty;
636✔
1285

1286
                /// <summary>
1287
                /// First arrow block name
1288
                /// </summary>
1289
                /// <remarks>
1290
                /// System variable DIMBLK1
1291
                /// </remarks>
1292
                [CadSystemVariable("$DIMBLK1", 1)]
1293
                public string DimensionBlockNameFirst { get; set; }
187✔
1294

1295
                /// <summary>
1296
                /// Second arrow block name
1297
                /// </summary>
1298
                /// <remarks>
1299
                /// System variable DIMBLK2
1300
                /// </remarks>
1301
                [CadSystemVariable("$DIMBLK2", 1)]
1302
                public string DimensionBlockNameSecond { get; set; }
187✔
1303

1304
                /// <remarks>
1305
                /// System variable TSTACKALIGN, default = 1(not present in DXF)
1306
                /// </remarks>
1307
                public short StackedTextAlignment { get; internal set; } = 1;
624✔
1308

1309
                /// <remarks>
1310
                /// TSTACKSIZE, default = 70(not present in DXF)
1311
                /// </remarks>
1312
                public short StackedTextSizePercentage { get; internal set; } = 70;
624✔
1313

1314
                /// <summary>
1315
                /// Path for all relative hyperlinks in the drawing. If null, the drawing path is used
1316
                /// </summary>
1317
                /// <remarks>
1318
                /// System variable HYPERLINKBASE
1319
                /// </remarks>
1320
                [CadSystemVariable("$HYPERLINKBASE", 1)]
1321
                public string HyperLinkBase { get; set; }
272✔
1322

1323
                /// <summary>
1324
                /// Lineweight of new objects
1325
                /// </summary>
1326
                /// <remarks>
1327
                /// System variable CELWEIGHT
1328
                /// </remarks>
1329
                [CadSystemVariable("$CELWEIGHT", 370)]
1330
                public LineweightType CurrentEntityLineWeight { get; set; } = LineweightType.ByLayer;
868✔
1331

1332
                /// <summary>
1333
                /// Lineweight endcaps setting for new objects
1334
                /// </summary>
1335
                /// <remarks>
1336
                /// System variable ENDCAPS
1337
                /// </remarks>
1338
                [CadSystemVariable("$ENDCAPS", 280)]
1339
                public short EndCaps { get; set; }
272✔
1340

1341
                /// <summary>
1342
                /// Lineweight joint setting for new objects
1343
                /// </summary>
1344
                /// <remarks>
1345
                /// System variable JOINSTYLE
1346
                /// </remarks>
1347
                [CadSystemVariable("$JOINSTYLE", 280)]
1348
                public short JoinStyle { get; set; }
272✔
1349

1350
                /// <summary>
1351
                /// Controls the display of lineweights on the Model or Layout tab<br/>
1352
                /// 0 = Lineweight is not displayed<br/>
1353
                /// 1 = Lineweight is displayed
1354
                /// </summary>
1355
                /// <remarks>
1356
                /// System variable LWDISPLAY
1357
                /// </remarks>
1358
                [CadSystemVariable("$LWDISPLAY", 290)]
1359
                public bool DisplayLineWeight { get; set; } = false;
868✔
1360

1361
                /// <summary>
1362
                /// Controls whether the current drawing can be edited in-place when being referenced by another drawing
1363
                /// </summary>
1364
                /// <remarks>
1365
                /// System variable XEDIT
1366
                /// </remarks>
1367
                [CadSystemVariable("$XEDIT", 290)]
1368
                public bool XEdit { get; set; }
272✔
1369

1370
                /// <summary>
1371
                /// Controls symbol table naming
1372
                /// </summary>
1373
                /// <remarks>
1374
                /// System variable EXTNAMES
1375
                /// </remarks>
1376
                [CadSystemVariable("$EXTNAMES", 290)]
1377
                public bool ExtendedNames { get; set; } = true;
868✔
1378

1379
                /// <summary>
1380
                /// Indicates whether the current drawing is in a Color-Dependent or Named Plot Style mode
1381
                /// </summary>
1382
                /// <remarks>
1383
                /// System variable PSTYLEMODE
1384
                /// </remarks>
1385
                [CadSystemVariable("$PSTYLEMODE", 290)]
1386
                public short PlotStyleMode { get; set; }
272✔
1387

1388
                /// <remarks>
1389
                /// System variable OLESTARTUP
1390
                /// </remarks>
1391
                //[CadSystemVariable("$OLESTARTUP", 290)]
1392
                public bool LoadOLEObject { get; set; }
130✔
1393

1394
                /// <summary>
1395
                /// Default drawing units for blocks
1396
                /// </summary>
1397
                /// <remarks>
1398
                /// System variable INSUNITS
1399
                /// </remarks>
1400
                [CadSystemVariable("$INSUNITS", 70)]
1401
                public UnitsType InsUnits { get; set; } = UnitsType.Unitless;
868✔
1402

1403
                /// <summary>
1404
                /// Plot style type of new objects
1405
                /// </summary>
1406
                /// <remarks>
1407
                /// System variable CEPSNTYPE
1408
                /// </remarks>
1409
                [CadSystemVariable("$CEPSNTYPE", 380)]
1410
                public EntityPlotStyleType CurrentEntityPlotStyle { get; set; }
402✔
1411

1412
                /// <summary>
1413
                /// Set at creation time, uniquely identifies a particular drawing
1414
                /// </summary>
1415
                /// <remarks>
1416
                /// System variable FINGERPRINTGUID
1417
                /// </remarks>
1418
                [CadSystemVariable("$FINGERPRINTGUID", 2)]
1419
                public string FingerPrintGuid { get; internal set; } = Guid.NewGuid().ToString();
766✔
1420

1421
                /// <summary>
1422
                /// Uniquely identifies a particular version of a drawing. Updated when the drawing is modified
1423
                /// </summary>
1424
                /// <remarks>
1425
                /// System variable VERSIONGUID
1426
                /// </remarks>
1427
                [CadSystemVariable("$VERSIONGUID", 2)]
1428
                public string VersionGuid { get; internal set; } = Guid.NewGuid().ToString();
766✔
1429

1430
                /// <summary>
1431
                /// Controls the object sorting methods
1432
                /// </summary>
1433
                /// <remarks>
1434
                /// System variable SORTENTS
1435
                /// </remarks>
1436
                [CadSystemVariable("$SORTENTS", 280)]
1437
                public ObjectSortingFlags EntitySortingFlags { get; set; }
226✔
1438

1439
                /// <summary>
1440
                /// Controls whether layer and spatial indexes are created and saved in drawing files
1441
                /// </summary>
1442
                /// <remarks>
1443
                /// System variable INDEXCTL
1444
                /// </remarks>
1445
                [CadSystemVariable("$INDEXCTL", 280)]
1446
                public IndexCreationFlags IndexCreationFlags { get; set; }
226✔
1447

1448
                /// <summary>
1449
                /// Specifies HIDETEXT system variable
1450
                /// </summary>
1451
                /// <remarks>
1452
                /// System variable HIDETEXT
1453
                /// </remarks>
1454
                [CadSystemVariable("$HIDETEXT", 280)]   //note: mismatch with docs, code 290
1455
                public byte HideText { get; set; }
226✔
1456

1457
                /// <summary>
1458
                /// Controls the visibility of xref clipping boundaries
1459
                /// </summary>
1460
                /// <remarks>
1461
                /// System variable XCLIPFRAME
1462
                /// </remarks>
1463
                [CadSystemVariable("$XCLIPFRAME", 280)] //note: mismatch with docs, code 290
1464
                public byte ExternalReferenceClippingBoundaryType { get; set; }
226✔
1465

1466
                /// <summary>
1467
                /// Controls the associativity of dimension objects
1468
                /// </summary>
1469
                /// <remarks>
1470
                /// System variable DIMASSOC
1471
                /// </remarks>
1472
                [CadSystemVariable("$DIMASSOC", 280)]
1473
                public DimensionAssociation DimensionAssociativity { get; set; } = DimensionAssociation.CreateExplodedDimensions;
720✔
1474

1475
                /// <summary>
1476
                /// 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
1477
                /// </summary>
1478
                /// <remarks>
1479
                /// System variable HALOGAP
1480
                /// </remarks>
1481
                [CadSystemVariable("$HALOGAP", 280)]
1482
                public byte HaloGapPercentage { get; set; }
226✔
1483

1484
                public Color ObscuredColor { get; set; }
108✔
1485

1486
                /// <summary>
1487
                /// Represents the ACI color index of the "interference objects" created during the INTERFERE command. Default value is 1
1488
                /// </summary>
1489
                /// <remarks>
1490
                /// System variable INTERFERECOLOR
1491
                /// </remarks>
1492
                [CadSystemVariable("$INTERFERECOLOR", 62)]
1493
                public Color InterfereColor { get; set; }
289✔
1494

1495
                public byte ObscuredType { get; set; }
108✔
1496

1497
                public byte IntersectionDisplay { get; set; }
108✔
1498

1499
                /// <summary>
1500
                /// 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
1501
                /// </summary>
1502
                /// <remarks>
1503
                /// System variable PROJECTNAME
1504
                /// </remarks>
1505
                [CadSystemVariable("$PROJECTNAME", 1)]
1506
                public string ProjectName { get; set; }
226✔
1507

1508
                public bool CameraDisplayObjects { get; set; }
85✔
1509
                public double StepsPerSecond { get; set; }
85✔
1510
                public double StepSize { get; set; }
85✔
1511
                public double Dw3DPrecision { get; set; }
85✔
1512
                public double LensLength { get; set; }
85✔
1513
                public double CameraHeight { get; set; }
85✔
1514
                public char SolidsRetainHistory { get; set; }
85✔
1515
                public char ShowSolidsHistory { get; set; }
85✔
1516
                public double SweptSolidWidth { get; set; }
85✔
1517
                public double SweptSolidHeight { get; set; }
85✔
1518
                public double DraftAngleFirstCrossSection { get; set; }
85✔
1519
                public double DraftAngleSecondCrossSection { get; set; }
85✔
1520
                public double DraftMagnitudeFirstCrossSection { get; set; }
85✔
1521
                public double DraftMagnitudeSecondCrossSection { get; set; }
85✔
1522
                public short SolidLoftedShape { get; set; }
85✔
1523
                public char LoftedObjectNormals { get; set; }
85✔
1524

1525
                /// <summary>
1526
                /// Specifies the latitude of the drawing model in decimal format
1527
                /// </summary>
1528
                /// <remarks>
1529
                /// System variable LATITUDE
1530
                /// </remarks>
1531
                [CadSystemVariable("$LATITUDE", 40)]
1532
                public double Latitude { get; set; } = 37.7950d;
675✔
1533

1534
                /// <summary>
1535
                /// Specifies the longitude of the drawing model in decimal format
1536
                /// </summary>
1537
                /// <remarks>
1538
                /// System variable LONGITUDE
1539
                /// </remarks>
1540
                [CadSystemVariable("$LONGITUDE", 40)]
1541
                public double Longitude { get; set; } = -122.394d;
675✔
1542

1543
                /// <remarks>
1544
                /// System variable NORTHDIRECTION
1545
                /// </remarks>
1546
                [CadSystemVariable("$NORTHDIRECTION", 40)]
1547
                public double NorthDirection { get; set; }
181✔
1548

1549
                /// <remarks>
1550
                /// System variable TIMEZONE
1551
                /// </remarks>
1552
                [CadSystemVariable("$TIMEZONE", 70)]
1553
                public int TimeZone { get; set; }
181✔
1554

1555
                public char DisplayLightGlyphs { get; set; }
85✔
1556

1557
                /// <remarks>
1558
                /// System variable DWFFRAME
1559
                /// </remarks>
1560
                [CadSystemVariable("$DWFFRAME", 280)]
1561
                public char DwgUnderlayFramesVisibility { get; set; }
181✔
1562

1563
                /// <remarks>
1564
                /// System variable DGNFRAME
1565
                /// </remarks>
1566
                [CadSystemVariable("$DGNFRAME", 280)]
1567
                public char DgnUnderlayFramesVisibility { get; set; }
181✔
1568

1569
                /// <summary>
1570
                /// Shadow mode for a 3D object
1571
                /// </summary>
1572
                /// <remarks>
1573
                /// System variable CSHADOW
1574
                /// </remarks>
1575
                [CadSystemVariable("$CSHADOW", 280)]
1576
                public ShadowMode ShadowMode { get; set; }
181✔
1577

1578
                /// <summary>
1579
                /// Location of the ground shadow plane. This is a Z axis ordinate
1580
                /// </summary>
1581
                /// <remarks>
1582
                /// System variable SHADOWPLANELOCATION
1583
                /// </remarks>
1584
                [CadSystemVariable("$SHADOWPLANELOCATION", 40)]
1585
                public double ShadowPlaneLocation { get; set; }
181✔
1586

1587
                public string StyleSheetName { get; set; }
130✔
1588

1589
                /// <summary>
1590
                /// Dimension text style
1591
                /// </summary>
1592
                /// <remarks>
1593
                /// System variable DIMTXSTY
1594
                /// </remarks>
1595
                [CadSystemVariable("$DIMTXSTY", true, 7)]
1596
                public string DimensionTextStyleName
1597
                {
1598
                        get { return this._dimensionTextStyle.Name; }
×
1599
                        set
1600
                        {
142✔
1601
                                if (this.Document != null)
142!
1602
                                {
×
1603
                                        this._dimensionTextStyle = this.Document.TextStyles[value];
×
1604
                                }
×
1605
                                else
1606
                                {
142✔
1607
                                        this._dimensionTextStyle = new TextStyle(value);
142✔
1608
                                }
142✔
1609
                        }
142✔
1610
                }
1611

1612
                /// <summary>
1613
                /// Dimension style name
1614
                /// </summary>
1615
                /// <remarks>
1616
                /// System variable DIMSTYLE
1617
                /// </remarks>
1618
                [CadSystemVariable("$DIMSTYLE", true, 2)]
1619
                public string DimensionStyleOverridesName
1620
                {
1621
                        get { return this._dimensionStyleOverrides.Name; }
6,078✔
1622
                        set
1623
                        {
176✔
1624
                                if (this.Document != null)
176!
1625
                                {
×
1626
                                        this._dimensionStyleOverrides = this.Document.DimensionStyles[value];
×
1627
                                }
×
1628
                                else
1629
                                {
176✔
1630
                                        this._dimensionStyleOverrides = new DimensionStyle(value);
176✔
1631
                                }
176✔
1632
                        }
176✔
1633
                }
1634

1635
                /// <summary>
1636
                /// Number of precision places displayed in angular dimensions
1637
                /// </summary>
1638
                /// <remarks>
1639
                /// System variable DIMADEC
1640
                /// </remarks>
1641
                [CadSystemVariable("$DIMADEC", 70)]
1642
                public short DimensionAngularDimensionDecimalPlaces
1643
                {
1644
                        get { return this.DimensionStyleOverrides.AngularDimensionDecimalPlaces; }
90✔
1645
                        set
1646
                        {
265✔
1647
                                this.DimensionStyleOverrides.AngularDimensionDecimalPlaces = value;
265✔
1648
                        }
265✔
1649
                }
1650

1651
                /// <summary>
1652
                /// Number of decimal places for the tolerance values of a primary units dimension
1653
                /// </summary>
1654
                /// <remarks>
1655
                /// System variable DIMDEC
1656
                /// </remarks>
1657
                [CadSystemVariable("$DIMDEC", 70)]
1658
                public short DimensionDecimalPlaces
1659
                {
1660
                        get { return this.DimensionStyleOverrides.DecimalPlaces; }
90✔
1661
                        set
1662
                        {
265✔
1663
                                this.DimensionStyleOverrides.DecimalPlaces = value;
265✔
1664
                        }
265✔
1665
                }
1666

1667
                /// <summary>
1668
                /// Number of decimal places to display the tolerance values
1669
                /// </summary>
1670
                /// <remarks>
1671
                /// System variable DIMTDEC
1672
                /// </remarks>
1673
                [CadSystemVariable("$DIMTDEC", 70)]
1674
                public short DimensionToleranceDecimalPlaces
1675
                {
1676
                        get { return this.DimensionStyleOverrides.ToleranceDecimalPlaces; }
90✔
1677
                        set
1678
                        {
265✔
1679
                                this.DimensionStyleOverrides.ToleranceDecimalPlaces = value;
265✔
1680
                        }
265✔
1681
                }
1682

1683
                /// <summary>
1684
                /// Alternate unit dimensioning performed if nonzero
1685
                /// </summary>
1686
                /// <remarks>
1687
                /// System variable DIMALT
1688
                /// </remarks>
1689
                [CadSystemVariable("$DIMALT", 70)]
1690
                public bool DimensionAlternateUnitDimensioning
1691
                {
1692
                        get { return this.DimensionStyleOverrides.AlternateUnitDimensioning; }
90✔
1693
                        set
1694
                        {
287✔
1695
                                this.DimensionStyleOverrides.AlternateUnitDimensioning = value;
287✔
1696
                        }
287✔
1697
                }
1698

1699
                /// <summary>
1700
                /// Units format for alternate units of all dimension style family members except angular
1701
                /// </summary>
1702
                /// <remarks>
1703
                /// System variable DIMALTU
1704
                /// </remarks>
1705
                [CadSystemVariable("$DIMALTU", 70)]
1706
                public LinearUnitFormat DimensionAlternateUnitFormat
1707
                {
1708
                        get { return this.DimensionStyleOverrides.AlternateUnitFormat; }
90✔
1709
                        set
1710
                        {
265✔
1711
                                this.DimensionStyleOverrides.AlternateUnitFormat = value;
265✔
1712
                        }
265✔
1713
                }
1714

1715
                /// <summary>
1716
                /// Alternate unit scale factor
1717
                /// </summary>
1718
                /// <remarks>
1719
                /// System variable DIMALTF
1720
                /// </remarks>
1721
                [CadSystemVariable("$DIMALTF", 40)]
1722
                public double DimensionAlternateUnitScaleFactor
1723
                {
1724
                        get { return this.DimensionStyleOverrides.AlternateUnitScaleFactor; }
90✔
1725
                        set
1726
                        {
287✔
1727
                                this.DimensionStyleOverrides.AlternateUnitScaleFactor = value;
287✔
1728
                        }
287✔
1729
                }
1730

1731
                /// <summary>
1732
                /// Extension line offset
1733
                /// </summary>
1734
                /// <remarks>
1735
                /// System variable DIMEXO
1736
                /// </remarks>
1737
                [CadSystemVariable("$DIMEXO", 40)]
1738
                public double DimensionExtensionLineOffset
1739
                {
1740
                        get { return this.DimensionStyleOverrides.ExtensionLineOffset; }
90✔
1741
                        set
1742
                        {
287✔
1743
                                this.DimensionStyleOverrides.ExtensionLineOffset = value;
287✔
1744
                        }
287✔
1745
                }
1746

1747
                /// <summary>
1748
                /// Overall dimensioning scale factor
1749
                /// </summary>
1750
                /// <remarks>
1751
                /// System variable DIMSCALE
1752
                /// </remarks>
1753
                [CadSystemVariable("$DIMSCALE", 40)]
1754
                public double DimensionScaleFactor
1755
                {
1756
                        get { return this.DimensionStyleOverrides.ScaleFactor; }
90✔
1757
                        set
1758
                        {
287✔
1759
                                this.DimensionStyleOverrides.ScaleFactor = value;
287✔
1760
                        }
287✔
1761
                }
1762

1763
                /// <summary>
1764
                /// Alternate unit decimal places
1765
                /// </summary>
1766
                /// <remarks>
1767
                /// System variable DIMALTD
1768
                /// </remarks>
1769
                [CadSystemVariable("$DIMALTD", 70)]
1770
                public short DimensionAlternateUnitDecimalPlaces
1771
                {
1772
                        get { return this.DimensionStyleOverrides.AlternateUnitDecimalPlaces; }
90✔
1773
                        set
1774
                        {
287✔
1775
                                this.DimensionStyleOverrides.AlternateUnitDecimalPlaces = value;
287✔
1776
                        }
287✔
1777
                }
1778

1779
                /// <summary>
1780
                /// Number of decimal places for tolerance values of an alternate units dimension
1781
                /// </summary>
1782
                /// <remarks>
1783
                /// System variable DIMALTTD
1784
                /// </remarks>
1785
                [CadSystemVariable("$DIMALTTD", 70)]
1786
                public short DimensionAlternateUnitToleranceDecimalPlaces
1787
                {
1788
                        get { return this.DimensionStyleOverrides.AlternateUnitToleranceDecimalPlaces; }
90✔
1789
                        set
1790
                        {
265✔
1791
                                this.DimensionStyleOverrides.AlternateUnitToleranceDecimalPlaces = value;
265✔
1792
                        }
265✔
1793
                }
1794

1795
                /// <summary>
1796
                /// Angle format for angular dimensions
1797
                /// </summary>
1798
                /// <remarks>
1799
                /// System variable DIMAUNIT
1800
                /// </remarks>
1801
                [CadSystemVariable("$DIMAUNIT", 70)]
1802
                public AngularUnitFormat DimensionAngularUnit
1803
                {
1804
                        get { return this.DimensionStyleOverrides.AngularUnit; }
75✔
1805
                        set
1806
                        {
247✔
1807
                                this.DimensionStyleOverrides.AngularUnit = value;
247✔
1808
                        }
247✔
1809
                }
1810

1811
                /// <summary>
1812
                /// Undocumented
1813
                /// </summary>
1814
                /// <remarks>
1815
                /// System variable DIMFRAC
1816
                /// </remarks>
1817
                [CadSystemVariable("$DIMFRAC", 70)]
1818
                public FractionFormat DimensionFractionFormat
1819
                {
1820
                        get { return this.DimensionStyleOverrides.FractionFormat; }
75✔
1821
                        set
1822
                        {
247✔
1823
                                this.DimensionStyleOverrides.FractionFormat = value;
247✔
1824
                        }
247✔
1825
                }
1826

1827
                /// <summary>
1828
                /// Sets units for all dimension types except Angular
1829
                /// </summary>
1830
                /// <remarks>
1831
                /// System variable DIMLUNIT
1832
                /// </remarks>
1833
                [CadSystemVariable("$DIMLUNIT", 70)]
1834
                public LinearUnitFormat DimensionLinearUnitFormat
1835
                {
1836
                        get { return this.DimensionStyleOverrides.LinearUnitFormat; }
75✔
1837
                        set
1838
                        {
247✔
1839
                                this.DimensionStyleOverrides.LinearUnitFormat = value;
247✔
1840
                        }
247✔
1841
                }
1842

1843
                /// <summary>
1844
                /// Single-character decimal separator used when creating dimensions whose unit format is decimal
1845
                /// </summary>
1846
                /// <remarks>
1847
                /// System variable DIMLUNIT
1848
                /// </remarks>
1849
                [CadSystemVariable("$DIMDSEP", 70)]
1850
                public char DimensionDecimalSeparator
1851
                {
1852
                        get { return this.DimensionStyleOverrides.DecimalSeparator; }
75✔
1853
                        set
1854
                        {
247✔
1855
                                this.DimensionStyleOverrides.DecimalSeparator = value;
247✔
1856
                        }
247✔
1857
                }
1858

1859
                /// <summary>
1860
                /// Dimension text movement rules decimal
1861
                /// </summary>
1862
                /// <remarks>
1863
                /// System variable DIMTMOVE
1864
                /// </remarks>
1865
                [CadSystemVariable("$DIMTMOVE", 70)]
1866
                public TextMovement DimensionTextMovement
1867
                {
1868
                        get { return this.DimensionStyleOverrides.TextMovement; }
75✔
1869
                        set
1870
                        {
247✔
1871
                                this.DimensionStyleOverrides.TextMovement = value;
247✔
1872
                        }
247✔
1873
                }
1874

1875
                /// <summary>
1876
                /// Horizontal dimension text position
1877
                /// </summary>
1878
                /// <remarks>
1879
                /// System variable DIMJUST
1880
                /// </remarks>
1881
                [CadSystemVariable("$DIMJUST", 70)]
1882
                public DimensionTextHorizontalAlignment DimensionTextHorizontalAlignment
1883
                {
1884
                        get { return this.DimensionStyleOverrides.TextHorizontalAlignment; }
90✔
1885
                        set
1886
                        {
265✔
1887
                                this.DimensionStyleOverrides.TextHorizontalAlignment = value;
265✔
1888
                        }
265✔
1889
                }
1890

1891
                /// <summary>
1892
                /// Suppression of first extension line
1893
                /// </summary>
1894
                /// <remarks>
1895
                /// System variable DIMSD1
1896
                /// </remarks>
1897
                [CadSystemVariable("$DIMSD1", 70)]
1898
                public bool DimensionSuppressFirstDimensionLine
1899
                {
1900
                        get { return this.DimensionStyleOverrides.SuppressFirstDimensionLine; }
15✔
1901
                        set
1902
                        {
160✔
1903
                                this.DimensionStyleOverrides.SuppressFirstDimensionLine = value;
160✔
1904
                        }
160✔
1905
                }
1906

1907
                /// <summary>
1908
                /// Suppression of second extension line
1909
                /// </summary>
1910
                /// <remarks>
1911
                /// System variable DIMSD2
1912
                /// </remarks>
1913
                [CadSystemVariable("$DIMSD2", 70)]
1914
                public bool DimensionSuppressSecondDimensionLine
1915
                {
1916
                        get { return this.DimensionStyleOverrides.SuppressSecondDimensionLine; }
15✔
1917
                        set
1918
                        {
160✔
1919
                                this.DimensionStyleOverrides.SuppressSecondDimensionLine = value;
160✔
1920
                        }
160✔
1921
                }
1922

1923
                /// <summary>
1924
                /// Vertical justification for tolerance values
1925
                /// </summary>
1926
                /// <remarks>
1927
                /// System variable DIMTOL
1928
                /// </remarks>
1929
                [CadSystemVariable("$DIMTOL", 70)]
1930
                public bool DimensionGenerateTolerances
1931
                {
1932
                        get { return this.DimensionStyleOverrides.GenerateTolerances; }
90✔
1933
                        set
1934
                        {
287✔
1935
                                this.DimensionStyleOverrides.GenerateTolerances = value;
287✔
1936
                        }
287✔
1937
                }
1938

1939
                /// <summary>
1940
                /// Vertical justification for tolerance values
1941
                /// </summary>
1942
                /// <remarks>
1943
                /// System variable DIMTOLJ
1944
                /// </remarks>
1945
                [CadSystemVariable("$DIMTOLJ", 70)]
1946
                public ToleranceAlignment DimensionToleranceAlignment
1947
                {
1948
                        get { return this.DimensionStyleOverrides.ToleranceAlignment; }
90✔
1949
                        set
1950
                        {
265✔
1951
                                this.DimensionStyleOverrides.ToleranceAlignment = value;
265✔
1952
                        }
265✔
1953
                }
1954

1955
                /// <summary>
1956
                /// Controls suppression of zeros for primary unit values
1957
                /// </summary>
1958
                /// <remarks>
1959
                /// System variable DIMZIN
1960
                /// </remarks>
1961
                [CadSystemVariable("$DIMZIN", 70)]
1962
                public ZeroHandling DimensionZeroHandling
1963
                {
1964
                        get { return this.DimensionStyleOverrides.ZeroHandling; }
90✔
1965
                        set
1966
                        {
287✔
1967
                                this.DimensionStyleOverrides.ZeroHandling = value;
287✔
1968
                        }
287✔
1969
                }
1970

1971
                /// <summary>
1972
                /// Controls suppression of zeros for tolerance values
1973
                /// </summary>
1974
                /// <remarks>
1975
                /// System variable DIMTZIN
1976
                /// </remarks>
1977
                [CadSystemVariable("$DIMTZIN", 70)]
1978
                public ZeroHandling DimensionToleranceZeroHandling
1979
                {
1980
                        get { return this.DimensionStyleOverrides.ToleranceZeroHandling; }
90✔
1981
                        set
1982
                        {
265✔
1983
                                this.DimensionStyleOverrides.ToleranceZeroHandling = value;
265✔
1984
                        }
265✔
1985
                }
1986

1987
                /// <remarks>
1988
                /// System variable DIMFIT
1989
                /// </remarks>
1990
                [CadSystemVariable("$DIMFIT", 70)]
1991
                public short DimensionFit
1992
                {
1993
                        get { return this.DimensionStyleOverrides.DimensionFit; }
15✔
1994
                        set
1995
                        {
18✔
1996
                                this.DimensionStyleOverrides.DimensionFit = value;
18✔
1997
                        }
18✔
1998
                }
1999

2000
                /// <summary>
2001
                /// Controls suppression of zeros for alternate unit dimension values
2002
                /// </summary>
2003
                /// <remarks>
2004
                /// System variable DIMALTZ
2005
                /// </remarks>
2006
                [CadSystemVariable("$DIMALTZ", 70)]
2007
                public ZeroHandling DimensionAlternateUnitZeroHandling
2008
                {
2009
                        get { return this.DimensionStyleOverrides.AlternateUnitZeroHandling; }
90✔
2010
                        set
2011
                        {
265✔
2012
                                this.DimensionStyleOverrides.AlternateUnitZeroHandling = value;
265✔
2013
                        }
265✔
2014
                }
2015

2016
                /// <summary>
2017
                /// Controls suppression of zeros for alternate tolerance values
2018
                /// </summary>
2019
                /// <remarks>
2020
                /// System variable DIMALTTZ
2021
                /// </remarks>
2022
                [CadSystemVariable("$DIMALTTZ", 70)]
2023
                public ZeroHandling DimensionAlternateUnitToleranceZeroHandling
2024
                {
2025
                        get { return this.DimensionStyleOverrides.AlternateUnitToleranceZeroHandling; }
90✔
2026
                        set
2027
                        {
265✔
2028
                                this.DimensionStyleOverrides.AlternateUnitToleranceZeroHandling = value;
265✔
2029
                        }
265✔
2030
                }
2031

2032
                /// <summary>
2033
                /// Cursor functionality for user-positioned text
2034
                /// </summary>
2035
                /// <remarks>
2036
                /// System variable DIMUPT
2037
                /// </remarks>
2038
                [CadSystemVariable("$DIMUPT", 70)]
2039
                public bool DimensionCursorUpdate
2040
                {
2041
                        get { return this.DimensionStyleOverrides.CursorUpdate; }
90✔
2042
                        set
2043
                        {
265✔
2044
                                this.DimensionStyleOverrides.CursorUpdate = value;
265✔
2045
                        }
265✔
2046
                }
2047

2048
                /// <summary>
2049
                /// Controls dimension text and arrow placement when space is not sufficient to place both within the extension lines
2050
                /// </summary>
2051
                /// <remarks>
2052
                /// System variable DIMATFIT
2053
                /// </remarks>
2054
                [CadSystemVariable("$DIMATFIT", 70)]
2055
                public TextArrowFitType DimensionDimensionTextArrowFit
2056
                {
2057
                        get { return this.DimensionStyleOverrides.DimensionTextArrowFit; }
75✔
2058
                        set
2059
                        {
247✔
2060
                                this.DimensionStyleOverrides.DimensionTextArrowFit = value;
247✔
2061
                        }
247✔
2062
                }
2063

2064
                /// <summary>
2065
                /// Determines rounding of alternate units
2066
                /// </summary>
2067
                /// <remarks>
2068
                /// System variable DIMALTRND
2069
                /// </remarks>
2070
                [CadSystemVariable("$DIMALTRND", 40)]
2071
                public double DimensionAlternateUnitRounding
2072
                {
2073
                        get { return this.DimensionStyleOverrides.AlternateUnitRounding; }
75✔
2074
                        set
2075
                        {
247✔
2076
                                this.DimensionStyleOverrides.AlternateUnitRounding = value;
247✔
2077
                        }
247✔
2078
                }
2079

2080
                /// <summary>
2081
                /// Alternate dimensioning suffix
2082
                /// </summary>
2083
                /// <remarks>
2084
                /// System variable DIMAPOST
2085
                /// </remarks>
2086
                [CadSystemVariable("$DIMAPOST", 1)]
2087
                public string DimensionAlternateDimensioningSuffix
2088
                {
2089
                        get { return this.DimensionStyleOverrides.AlternateDimensioningSuffix; }
90✔
2090
                        set
2091
                        {
287✔
2092
                                this.DimensionStyleOverrides.AlternateDimensioningSuffix = value;
287✔
2093
                        }
287✔
2094
                }
2095

2096
                /// <summary>
2097
                /// Dimensioning arrow size
2098
                /// </summary>
2099
                /// <remarks>
2100
                /// System variable DIMASZ
2101
                /// </remarks>
2102
                [CadSystemVariable("$DIMASZ", 40)]
2103
                public double DimensionArrowSize
2104
                {
2105
                        get { return this.DimensionStyleOverrides.ArrowSize; }
90✔
2106
                        set
2107
                        {
287✔
2108
                                this.DimensionStyleOverrides.ArrowSize = value;
287✔
2109
                        }
287✔
2110
                }
2111

2112
                /// <summary>
2113
                /// Controls suppression of zeros for angular dimensions
2114
                /// </summary>
2115
                /// <remarks>
2116
                /// System variable DIMAZIN
2117
                /// </remarks>
2118
                [CadSystemVariable("$DIMAZIN", 70)]
2119
                public ZeroHandling DimensionAngularZeroHandling
2120
                {
2121
                        get { return this.DimensionStyleOverrides.AngularZeroHandling; }
75✔
2122
                        set
2123
                        {
247✔
2124
                                this.DimensionStyleOverrides.AngularZeroHandling = value;
247✔
2125
                        }
247✔
2126
                }
2127

2128
                /// <summary>
2129
                /// Undocumented
2130
                /// </summary>
2131
                /// <remarks>
2132
                /// System variable DIMARCSYM
2133
                /// </remarks>
2134
                [CadSystemVariable("$DIMARCSYM", 70)]
2135
                public ArcLengthSymbolPosition DimensionArcLengthSymbolPosition
2136
                {
2137
                        get { return this.DimensionStyleOverrides.ArcLengthSymbolPosition; }
48✔
2138
                        set
2139
                        {
165✔
2140
                                this.DimensionStyleOverrides.ArcLengthSymbolPosition = value;
165✔
2141
                        }
165✔
2142
                }
2143

2144
                /// <summary>
2145
                /// Use separate arrow blocks if nonzero
2146
                /// </summary>
2147
                /// <remarks>
2148
                /// System variable DIMSAH
2149
                /// </remarks>
2150
                [CadSystemVariable("$DIMSAH", 70)]
2151
                public bool DimensionSeparateArrowBlocks
2152
                {
2153
                        get { return this.DimensionStyleOverrides.SeparateArrowBlocks; }
90✔
2154
                        set
2155
                        {
287✔
2156
                                this.DimensionStyleOverrides.SeparateArrowBlocks = value;
287✔
2157
                        }
287✔
2158
                }
2159

2160
                /// <summary>
2161
                /// Size of center mark/lines
2162
                /// </summary>
2163
                /// <remarks>
2164
                /// System variable DIMCEN
2165
                /// </remarks>
2166
                [CadSystemVariable("$DIMCEN", 40)]
2167
                public double DimensionCenterMarkSize
2168
                {
2169
                        get { return this.DimensionStyleOverrides.CenterMarkSize; }
90✔
2170
                        set
2171
                        {
287✔
2172
                                this.DimensionStyleOverrides.CenterMarkSize = value;
287✔
2173
                        }
287✔
2174
                }
2175

2176
                /// <summary>
2177
                /// Dimensioning tick size
2178
                /// </summary>
2179
                /// <remarks>
2180
                /// System variable DIMTSZ
2181
                /// </remarks>
2182
                [CadSystemVariable("$DIMTSZ", 40)]
2183
                public double DimensionTickSize
2184
                {
2185
                        get { return this.DimensionStyleOverrides.TickSize; }
90✔
2186
                        set
2187
                        {
287✔
2188
                                this.DimensionStyleOverrides.TickSize = value;
287✔
2189
                        }
287✔
2190
                }
2191

2192
                /// <summary>
2193
                /// Dimension line color
2194
                /// </summary>
2195
                /// <remarks>
2196
                /// System variable DIMCLRD
2197
                /// </remarks>
2198
                [CadSystemVariable("$DIMCLRD", 70)]
2199
                public Color DimensionLineColor
2200
                {
2201
                        get { return this.DimensionStyleOverrides.DimensionLineColor; }
90✔
2202
                        set
2203
                        {
287✔
2204
                                this.DimensionStyleOverrides.DimensionLineColor = value;
287✔
2205
                        }
287✔
2206
                }
2207

2208
                /// <summary>
2209
                /// Dimension extension line color
2210
                /// </summary>
2211
                /// <remarks>
2212
                /// System variable DIMCLRE
2213
                /// </remarks>
2214
                [CadSystemVariable("$DIMCLRE", 70)]
2215
                public Color DimensionExtensionLineColor
2216
                {
2217
                        get { return this.DimensionStyleOverrides.ExtensionLineColor; }
90✔
2218
                        set
2219
                        {
287✔
2220
                                this.DimensionStyleOverrides.ExtensionLineColor = value;
287✔
2221
                        }
287✔
2222
                }
2223

2224
                /// <summary>
2225
                /// Dimension text color
2226
                /// </summary>
2227
                /// <remarks>
2228
                /// System variable DIMCLRT
2229
                /// </remarks>
2230
                [CadSystemVariable("$DIMCLRT", 70)]
2231
                public Color DimensionTextColor
2232
                {
2233
                        get { return this.DimensionStyleOverrides.TextColor; }
90✔
2234
                        set
2235
                        {
287✔
2236
                                this.DimensionStyleOverrides.TextColor = value;
287✔
2237
                        }
287✔
2238
                }
2239

2240
                /// <summary>
2241
                /// Dimension line extension
2242
                /// </summary>
2243
                /// <remarks>
2244
                /// System variable DIMDLE
2245
                /// </remarks>
2246
                [CadSystemVariable("$DIMDLE", 40)]
2247
                public double DimensionLineExtension
2248
                {
2249
                        get { return this.DimensionStyleOverrides.DimensionLineExtension; }
90✔
2250
                        set
2251
                        {
287✔
2252
                                this.DimensionStyleOverrides.DimensionLineExtension = value;
287✔
2253
                        }
287✔
2254
                }
2255

2256
                /// <summary>
2257
                /// Dimension line increment
2258
                /// </summary>
2259
                /// <remarks>
2260
                /// System variable DIMDLI
2261
                /// </remarks>
2262
                [CadSystemVariable("$DIMDLI", 40)]
2263
                public double DimensionLineIncrement
2264
                {
2265
                        get { return this.DimensionStyleOverrides.DimensionLineIncrement; }
90✔
2266
                        set
2267
                        {
287✔
2268
                                this.DimensionStyleOverrides.DimensionLineIncrement = value;
287✔
2269
                        }
287✔
2270
                }
2271

2272
                /// <summary>
2273
                /// Extension line extension
2274
                /// </summary>
2275
                /// <remarks>
2276
                /// System variable DIMEXE
2277
                /// </remarks>
2278
                [CadSystemVariable("$DIMEXE", 40)]
2279
                public double DimensionExtensionLineExtension
2280
                {
2281
                        get { return this.DimensionStyleOverrides.ExtensionLineExtension; }
90✔
2282
                        set
2283
                        {
287✔
2284
                                this.DimensionStyleOverrides.ExtensionLineExtension = value;
287✔
2285
                        }
287✔
2286
                }
2287

2288
                /// <summary>
2289
                /// Undocumented
2290
                /// </summary>
2291
                /// <remarks>
2292
                /// System variable DIMFXLON
2293
                /// </remarks>
2294
                [CadSystemVariable("$DIMFXLON", 70)]
2295
                public bool DimensionIsExtensionLineLengthFixed
2296
                {
2297
                        get { return this.DimensionStyleOverrides.IsExtensionLineLengthFixed; }
48✔
2298
                        set
2299
                        {
165✔
2300
                                this.DimensionStyleOverrides.IsExtensionLineLengthFixed = value;
165✔
2301
                        }
165✔
2302
                }
2303

2304
                /// <summary>
2305
                /// Undocumented
2306
                /// </summary>
2307
                /// <remarks>
2308
                /// System variable DIMFXL
2309
                /// </remarks>
2310
                [CadSystemVariable("$DIMFXL", 40)]
2311
                public double DimensionFixedExtensionLineLength
2312
                {
2313
                        get { return this.DimensionStyleOverrides.FixedExtensionLineLength; }
48✔
2314
                        set
2315
                        {
165✔
2316
                                this.DimensionStyleOverrides.FixedExtensionLineLength = value;
165✔
2317
                        }
165✔
2318
                }
2319

2320
                /// <summary>
2321
                /// Undocumented
2322
                /// </summary>
2323
                /// <remarks>
2324
                /// System variable DIMJOGANG
2325
                /// </remarks>
2326
                [CadSystemVariable("$DIMJOGANG", 40)]
2327
                public double DimensionJoggedRadiusDimensionTransverseSegmentAngle
2328
                {
2329
                        get { return this.DimensionStyleOverrides.JoggedRadiusDimensionTransverseSegmentAngle; }
48✔
2330
                        set
2331
                        {
165✔
2332
                                this.DimensionStyleOverrides.JoggedRadiusDimensionTransverseSegmentAngle = value;
165✔
2333
                        }
165✔
2334
                }
2335

2336
                /// <summary>
2337
                /// Undocumented
2338
                /// </summary>
2339
                /// <remarks>
2340
                /// System variable DIMTFILL
2341
                /// </remarks>
2342
                [CadSystemVariable("$DIMTFILL", 70)]
2343
                public DimensionTextBackgroundFillMode DimensionTextBackgroundFillMode
2344
                {
2345
                        get { return this.DimensionStyleOverrides.TextBackgroundFillMode; }
48✔
2346
                        set
2347
                        {
165✔
2348
                                this.DimensionStyleOverrides.TextBackgroundFillMode = value;
165✔
2349
                        }
165✔
2350
                }
2351

2352
                /// <summary>
2353
                /// Undocumented
2354
                /// </summary>
2355
                /// <remarks>
2356
                /// System variable DIMTFILLCLR
2357
                /// </remarks>
2358
                [CadSystemVariable(DxfReferenceType.Ignored, "$DIMTFILLCLR", 62)]
2359
                public Color DimensionTextBackgroundColor
2360
                {
2361
                        get { return this.DimensionStyleOverrides.TextBackgroundColor; }
48✔
2362
                        set
2363
                        {
165✔
2364
                                this.DimensionStyleOverrides.TextBackgroundColor = value;
165✔
2365
                        }
165✔
2366
                }
2367

2368
                /// <summary>
2369
                /// Undocumented
2370
                /// </summary>
2371
                /// <remarks>
2372
                /// System variable DIMGAP
2373
                /// </remarks>
2374
                [CadSystemVariable("$DIMGAP", 40)]
2375
                public double DimensionLineGap
2376
                {
2377
                        get { return this.DimensionStyleOverrides.DimensionLineGap; }
90✔
2378
                        set
2379
                        {
287✔
2380
                                this.DimensionStyleOverrides.DimensionLineGap = value;
287✔
2381
                        }
287✔
2382
                }
2383

2384
                /// <summary>
2385
                /// Linear measurements scale factor
2386
                /// </summary>
2387
                /// <remarks>
2388
                /// System variable DIMLFAC
2389
                /// </remarks>
2390
                [CadSystemVariable("$DIMLFAC", 40)]
2391
                public double DimensionLinearScaleFactor
2392
                {
2393
                        get { return this.DimensionStyleOverrides.LinearScaleFactor; }
90✔
2394
                        set
2395
                        {
287✔
2396
                                this.DimensionStyleOverrides.LinearScaleFactor = value;
287✔
2397
                        }
287✔
2398
                }
2399

2400
                /// <summary>
2401
                /// Text vertical position
2402
                /// </summary>
2403
                /// <remarks>
2404
                /// System variable DIMTVP
2405
                /// </remarks>
2406
                [CadSystemVariable("$DIMTVP", 40)]
2407
                public double DimensionTextVerticalPosition
2408
                {
2409
                        get { return this.DimensionStyleOverrides.TextVerticalPosition; }
90✔
2410
                        set
2411
                        {
287✔
2412
                                this.DimensionStyleOverrides.TextVerticalPosition = value;
287✔
2413
                        }
287✔
2414
                }
2415

2416
                /// <summary>
2417
                /// Dimension line lineweight
2418
                /// </summary>
2419
                /// <remarks>
2420
                /// System variable DIMLWD
2421
                /// </remarks>
2422
                [CadSystemVariable("$DIMLWD", 70)]
2423
                public LineweightType DimensionLineWeight
2424
                {
2425
                        get { return this.DimensionStyleOverrides.DimensionLineWeight; }
75✔
2426
                        set
2427
                        {
247✔
2428
                                this.DimensionStyleOverrides.DimensionLineWeight = value;
247✔
2429
                        }
247✔
2430
                }
2431

2432
                /// <summary>
2433
                /// Extension line lineweight
2434
                /// </summary>
2435
                /// <remarks>
2436
                /// System variable DIMLWE
2437
                /// </remarks>
2438
                [CadSystemVariable("$DIMLWE", 70)]
2439
                public LineweightType ExtensionLineWeight
2440
                {
2441
                        get { return this.DimensionStyleOverrides.ExtensionLineWeight; }
75✔
2442
                        set
2443
                        {
247✔
2444
                                this.DimensionStyleOverrides.ExtensionLineWeight = value;
247✔
2445
                        }
247✔
2446
                }
2447

2448
                /// <summary>
2449
                /// Undocumented
2450
                /// </summary>
2451
                /// <remarks>
2452
                /// System variable DIMPOST
2453
                /// </remarks>
2454
                [CadSystemVariable("$DIMPOST", 1)]
2455
                public string DimensionPostFix
2456
                {
2457
                        get { return this.DimensionStyleOverrides.PostFix; }
90✔
2458
                        set
2459
                        {
287✔
2460
                                this.DimensionStyleOverrides.PostFix = value;
287✔
2461
                        }
287✔
2462
                }
2463

2464
                /// <summary>
2465
                /// Rounding value for dimension distances
2466
                /// </summary>
2467
                /// <remarks>
2468
                /// System variable DIMRND
2469
                /// </remarks>
2470
                [CadSystemVariable("$DIMRND", 40)]
2471
                public double DimensionRounding
2472
                {
2473
                        get { return this.DimensionStyleOverrides.Rounding; }
90✔
2474
                        set
2475
                        {
287✔
2476
                                this.DimensionStyleOverrides.Rounding = value;
287✔
2477
                        }
287✔
2478
                }
2479

2480
                /// <summary>
2481
                /// First extension line suppressed if nonzero
2482
                /// </summary>
2483
                /// <remarks>
2484
                /// System variable DIMSE1
2485
                /// </remarks>
2486
                [CadSystemVariable("$DIMSE1", 70)]
2487
                public bool DimensionSuppressFirstExtensionLine
2488
                {
2489
                        get { return this.DimensionStyleOverrides.SuppressFirstExtensionLine; }
165✔
2490
                        set
2491
                        {
392✔
2492
                                this.DimensionStyleOverrides.SuppressFirstExtensionLine = value;
392✔
2493
                        }
392✔
2494
                }
2495

2496
                /// <summary>
2497
                /// Second extension line suppressed if nonzero
2498
                /// </summary>
2499
                /// <remarks>
2500
                /// System variable DIMSE2
2501
                /// </remarks>
2502
                [CadSystemVariable("$DIMSE2", 70)]
2503
                public bool DimensionSuppressSecondExtensionLine
2504
                {
2505
                        get { return this.DimensionStyleOverrides.SuppressSecondExtensionLine; }
165✔
2506
                        set
2507
                        {
392✔
2508
                                this.DimensionStyleOverrides.SuppressSecondExtensionLine = value;
392✔
2509
                        }
392✔
2510
                }
2511

2512
                /// <summary>
2513
                /// Suppress outside-extensions dimension lines if nonzero
2514
                /// </summary>
2515
                /// <remarks>
2516
                /// System variable DIMSOXD
2517
                /// </remarks>
2518
                [CadSystemVariable("$DIMSOXD", 70)]
2519
                public bool DimensionSuppressOutsideExtensions
2520
                {
2521
                        get { return this.DimensionStyleOverrides.SuppressOutsideExtensions; }
90✔
2522
                        set
2523
                        {
287✔
2524
                                this.DimensionStyleOverrides.SuppressOutsideExtensions = value;
287✔
2525
                        }
287✔
2526
                }
2527

2528
                /// <summary>
2529
                /// Text above dimension line if nonzero
2530
                /// </summary>
2531
                /// <remarks>
2532
                /// System variable DIMTAD
2533
                /// </remarks>
2534
                [CadSystemVariable("$DIMTAD", 70)]
2535
                public DimensionTextVerticalAlignment DimensionTextVerticalAlignment
2536
                {
2537
                        get { return this.DimensionStyleOverrides.TextVerticalAlignment; }
90✔
2538
                        set
2539
                        {
287✔
2540
                                this.DimensionStyleOverrides.TextVerticalAlignment = value;
287✔
2541
                        }
287✔
2542
                }
2543

2544
                /// <summary>
2545
                /// Controls suppression of zeros for alternate unit dimension values
2546
                /// </summary>
2547
                /// <remarks>
2548
                /// System variable DIMUNIT
2549
                /// </remarks>
2550
                [CadSystemVariable("$DIMUNIT", 70)]
2551
                public short DimensionUnit
2552
                {
2553
                        get { return this.DimensionStyleOverrides.DimensionUnit; }
15✔
2554
                        set
2555
                        {
18✔
2556
                                this.DimensionStyleOverrides.DimensionUnit = value;
18✔
2557
                        }
18✔
2558
                }
2559

2560
                /// <summary>
2561
                /// Dimension tolerance display scale factor
2562
                /// </summary>
2563
                /// <remarks>
2564
                /// System variable DIMTFAC
2565
                /// </remarks>
2566
                [CadSystemVariable("$DIMTFAC", 40)]
2567
                public double DimensionToleranceScaleFactor
2568
                {
2569
                        get { return this.DimensionStyleOverrides.ToleranceScaleFactor; }
90✔
2570
                        set
2571
                        {
287✔
2572
                                this.DimensionStyleOverrides.ToleranceScaleFactor = value;
287✔
2573
                        }
287✔
2574
                }
2575

2576
                /// <summary>
2577
                /// Text inside horizontal if nonzero
2578
                /// </summary>
2579
                /// <remarks>
2580
                /// System variable DIMTIH
2581
                /// </remarks>
2582
                [CadSystemVariable("$DIMTIH", 70)]
2583
                public bool DimensionTextInsideHorizontal
2584
                {
2585
                        get { return this.DimensionStyleOverrides.TextInsideHorizontal; }
90✔
2586
                        set
2587
                        {
287✔
2588
                                this.DimensionStyleOverrides.TextInsideHorizontal = value;
287✔
2589
                        }
287✔
2590
                }
2591

2592
                /// <summary>
2593
                /// Force text inside extensions if nonzero
2594
                /// </summary>
2595
                /// <remarks>
2596
                /// System variable DIMTIX
2597
                /// </remarks>
2598
                [CadSystemVariable("$DIMTIX", 70)]
2599
                public bool DimensionTextInsideExtensions
2600
                {
2601
                        get { return this.DimensionStyleOverrides.TextInsideExtensions; }
90✔
2602
                        set
2603
                        {
287✔
2604
                                this.DimensionStyleOverrides.TextInsideExtensions = value;
287✔
2605
                        }
287✔
2606
                }
2607

2608
                /// <summary>
2609
                /// Minus tolerance
2610
                /// </summary>
2611
                /// <remarks>
2612
                /// System variable DIMTM
2613
                /// </remarks>
2614
                [CadSystemVariable("$DIMTM", 40)]
2615
                public double DimensionMinusTolerance
2616
                {
2617
                        get { return this.DimensionStyleOverrides.MinusTolerance; }
90✔
2618
                        set
2619
                        {
287✔
2620
                                this.DimensionStyleOverrides.MinusTolerance = value;
287✔
2621
                        }
287✔
2622
                }
2623

2624
                /// <summary>
2625
                /// If text is outside the extension lines, dimension lines are forced between the extension lines if nonzero
2626
                /// </summary>
2627
                /// <remarks>
2628
                /// System variable DIMTOFL
2629
                /// </remarks>
2630
                [CadSystemVariable("$DIMTOFL", 70)]
2631
                public bool DimensionTextOutsideExtensions
2632
                {
2633
                        get { return this.DimensionStyleOverrides.TextOutsideExtensions; }
90✔
2634
                        set
2635
                        {
287✔
2636
                                this.DimensionStyleOverrides.TextOutsideExtensions = value;
287✔
2637
                        }
287✔
2638
                }
2639

2640
                /// <summary>
2641
                /// Text outside horizontal if nonzero
2642
                /// </summary>
2643
                /// <remarks>
2644
                /// System variable DIMTOH
2645
                /// </remarks>
2646
                [CadSystemVariable("$DIMTOH", 70)]
2647
                public bool DimensionTextOutsideHorizontal
2648
                {
2649
                        get { return this.DimensionStyleOverrides.TextOutsideHorizontal; }
90✔
2650
                        set
2651
                        {
287✔
2652
                                this.DimensionStyleOverrides.TextOutsideHorizontal = value;
287✔
2653
                        }
287✔
2654
                }
2655

2656
                /// <summary>
2657
                /// Dimension limits generated if nonzero
2658
                /// </summary>
2659
                /// <remarks>
2660
                /// System variable DIMLIM
2661
                /// </remarks>
2662
                [CadSystemVariable("$DIMLIM", 70)]
2663
                public bool DimensionLimitsGeneration
2664
                {
2665
                        get { return this.DimensionStyleOverrides.LimitsGeneration; }
90✔
2666
                        set
2667
                        {
287✔
2668
                                this.DimensionStyleOverrides.LimitsGeneration = value;
287✔
2669
                        }
287✔
2670
                }
2671

2672
                /// <summary>
2673
                /// Plus tolerance
2674
                /// </summary>
2675
                /// <remarks>
2676
                /// System variable DIMTP
2677
                /// </remarks>
2678
                [CadSystemVariable("$DIMTP", 40)]
2679
                public double DimensionPlusTolerance
2680
                {
2681
                        get { return this.DimensionStyleOverrides.PlusTolerance; }
90✔
2682
                        set
2683
                        {
287✔
2684
                                this.DimensionStyleOverrides.PlusTolerance = value;
287✔
2685
                        }
287✔
2686
                }
2687

2688
                /// <summary>
2689
                /// Dimensioning text height
2690
                /// </summary>
2691
                /// <remarks>
2692
                /// System variable DIMTXT
2693
                /// </remarks>
2694
                [CadSystemVariable("$DIMTXT", 40)]
2695
                public double DimensionTextHeight
2696
                {
2697
                        get { return this.DimensionStyleOverrides.TextHeight; }
90✔
2698
                        set
2699
                        {
287✔
2700
                                this.DimensionStyleOverrides.TextHeight = value;
287✔
2701
                        }
287✔
2702
                }
2703

2704
                /// <summary>
2705
                /// Undocumented
2706
                /// </summary>
2707
                /// <remarks>
2708
                /// System variable DIMTXTDIRECTION
2709
                /// </remarks>
2710
                [CadSystemVariable("$DIMTXTDIRECTION", 70)]
2711
                public TextDirection DimensionTextDirection
2712
                {
2713
                        get { return this.DimensionStyleOverrides.TextDirection; }
45✔
2714
                        set
2715
                        {
127✔
2716
                                this.DimensionStyleOverrides.TextDirection = value;
127✔
2717
                        }
127✔
2718
                }
2719

2720
                /// <summary>
2721
                /// Undocumented
2722
                /// </summary>
2723
                /// <remarks>
2724
                /// System variable DIMALTMZF
2725
                /// </remarks>
2726
                [CadSystemVariable("$DIMALTMZF", 40)]
2727
                public double DimensionAltMzf
2728
                {
2729
                        get { return this.DimensionStyleOverrides.AltMzf; }
45✔
2730
                        set
2731
                        {
55✔
2732
                                this.DimensionStyleOverrides.AltMzf = value;
55✔
2733
                        }
55✔
2734
                }
2735

2736
                /// <summary>
2737
                /// Undocumented
2738
                /// </summary>
2739
                /// <remarks>
2740
                /// System variable DIMALTMZS
2741
                /// </remarks>
2742
                [CadSystemVariable("$DIMALTMZS", 6)]
2743
                public string DimensionAltMzs
2744
                {
2745
                        get { return this.DimensionStyleOverrides.AltMzs; }
45✔
2746
                        set
2747
                        {
55✔
2748
                                this.DimensionStyleOverrides.AltMzs = value;
55✔
2749
                        }
55✔
2750
                }
2751

2752
                /// <summary>
2753
                /// Undocumented
2754
                /// </summary>
2755
                /// <remarks>
2756
                /// System variable DIMMZF
2757
                /// </remarks>
2758
                [CadSystemVariable("$DIMMZF", 40)]
2759
                public double DimensionMzf
2760
                {
2761
                        get { return this.DimensionStyleOverrides.Mzf; }
45✔
2762
                        set
2763
                        {
55✔
2764
                                this.DimensionStyleOverrides.Mzf = value;
55✔
2765
                        }
55✔
2766
                }
2767

2768
                /// <summary>
2769
                /// Undocumented
2770
                /// </summary>
2771
                /// <remarks>
2772
                /// System variable DIMMZS
2773
                /// </remarks>
2774
                [CadSystemVariable("$DIMMZS", 6)]
2775
                public string DimensionMzs
2776
                {
2777
                        get { return this.DimensionStyleOverrides.Mzs; }
45✔
2778
                        set
2779
                        {
55✔
2780
                                this.DimensionStyleOverrides.Mzs = value;
55✔
2781
                        }
55✔
2782
                }
2783

2784
                /// <summary>
2785
                /// Undocumented
2786
                /// </summary>
2787
                /// <remarks>
2788
                /// System variable DIMLTYPE
2789
                /// </remarks>
2790
                [CadSystemVariable("$DIMLTYPE", 6)]
2791
                public string DimensionLineType { get; set; } = "ByBlock";
590✔
2792

2793
                /// <summary>
2794
                /// Undocumented
2795
                /// </summary>
2796
                /// <remarks>
2797
                /// System variable DIMLTEX1
2798
                /// </remarks>
2799
                [CadSystemVariable("$DIMLTEX1", 6)]
2800
                public string DimensionTex1 { get; set; } = "ByBlock";
590✔
2801

2802
                /// <summary>
2803
                /// Undocumented
2804
                /// </summary>
2805
                /// <remarks>
2806
                /// System variable DIMLTEX2
2807
                /// </remarks>
2808
                [CadSystemVariable("$DIMLTEX2", 6)]
2809
                public string DimensionTex2 { get; set; } = "ByBlock";
590✔
2810

2811
                public Layer CurrentLayer
2812
                {
2813
                        get
2814
                        {
40✔
2815
                                if (this.Document == null)
40✔
2816
                                {
5✔
2817
                                        return this._currentLayer;
5✔
2818
                                }
2819
                                else
2820
                                {
35✔
2821
                                        return this.Document.Layers[this.CurrentLayerName];
35✔
2822
                                }
2823
                        }
40✔
2824
                        private set
2825
                        {
×
2826
                                this._currentLayer = value;
×
2827
                        }
×
2828
                }
2829

2830
                public LineType CurrentLineType
2831
                {
2832
                        get
2833
                        {
30✔
2834
                                if (this.Document == null)
30!
UNCOV
2835
                                {
×
UNCOV
2836
                                        return this._currentLineType;
×
2837
                                }
2838
                                else
2839
                                {
30✔
2840
                                        return this.Document.LineTypes[this.CurrentLineTypeName];
30✔
2841
                                }
2842
                        }
30✔
2843
                        private set
2844
                        {
×
2845
                                _currentLineType = value;
×
2846
                        }
×
2847
                }
2848

2849
                public TextStyle CurrentTextStyle
2850
                {
2851
                        get
2852
                        {
35✔
2853
                                if (this.Document == null)
35!
UNCOV
2854
                                {
×
UNCOV
2855
                                        return this._currentTextStyle;
×
2856
                                }
2857
                                else
2858
                                {
35✔
2859
                                        return this.Document.TextStyles[this.TextStyleName];
35✔
2860
                                }
2861
                        }
35✔
2862
                        private set
2863
                        {
×
2864
                                this._currentTextStyle = value;
×
2865
                        }
×
2866
                }
2867

2868
                public TextStyle DimensionTextStyle
2869
                {
2870
                        get
2871
                        {
×
2872
                                if (this.Document == null)
×
2873
                                {
×
2874
                                        return this._dimensionTextStyle;
×
2875
                                }
2876
                                else
2877
                                {
×
2878
                                        return this.Document.TextStyles[this.DimensionTextStyleName];
×
2879
                                }
2880
                        }
×
2881
                        private set
2882
                        {
×
2883
                                this._dimensionTextStyle = value;
×
2884
                        }
×
2885
                }
2886

2887
                public DimensionStyle DimensionStyleOverrides
2888
                {
2889
                        get
2890
                        {
19,556✔
2891
                                if (this.Document == null)
19,556✔
2892
                                {
17,620✔
2893
                                        return this._dimensionStyleOverrides;
17,620✔
2894
                                }
2895
                                else
2896
                                {
1,936✔
2897
                                        return this.Document.DimensionStyles[this.DimensionStyleOverridesName];
1,936✔
2898
                                }
2899
                        }
19,556✔
2900
                        private set
2901
                        {
×
2902
                                this._dimensionStyleOverrides = value;
×
2903
                        }
×
2904
                }
2905

2906
                //TODO: How header UCS work??
2907
                public UCS ModelSpaceUcs { get; private set; } = new UCS();
1,792✔
2908

2909
                public UCS ModelSpaceUcsBase { get; private set; } = new UCS();
494✔
2910

2911
                public UCS PaperSpaceUcs { get; private set; } = new UCS();
1,792✔
2912

2913
                public UCS PaperSpaceUcsBase { get; private set; } = new UCS();
494✔
2914

2915
                /// <summary>
2916
                /// Document where this header resides
2917
                /// </summary>
2918
                public CadDocument Document { get; internal set; }
22,721✔
2919

2920
                private readonly static PropertyExpression<CadHeader, CadSystemVariableAttribute> _propertyCache;
2921

2922
                private Layer _currentLayer = Layer.Default;
494✔
2923

2924
                private TextStyle _currentTextStyle = TextStyle.Default;
494✔
2925

2926
                private TextStyle _dimensionTextStyle = TextStyle.Default;
494✔
2927

2928
                private DimensionStyle _dimensionStyleOverrides = DimensionStyle.Default;
494✔
2929

2930
                private LineType _currentLineType = LineType.ByLayer;
494✔
2931

2932
                static CadHeader()
2933
                {
1✔
2934
                        _propertyCache = new PropertyExpression<CadHeader, CadSystemVariableAttribute>(
1✔
2935
                                (info, attribute) => attribute.Name);
229✔
2936
                }
1✔
2937

2938
                public CadHeader() : this(ACadVersion.AC1018) { }
948✔
2939

2940
                public CadHeader(CadDocument document) : this(ACadVersion.AC1018)
178✔
2941
                {
178✔
2942
                        this.Document = document;
178✔
2943
                }
178✔
2944

2945
                public CadHeader(ACadVersion version)
494✔
2946
                {
494✔
2947
                        this.Version = version;
494✔
2948
                }
494✔
2949

2950
                /// <summary>
2951
                /// Gets a map of all the system variables and it's codes
2952
                /// </summary>
2953
                /// <returns></returns>
2954
                public static Dictionary<string, CadSystemVariable> GetHeaderMap()
2955
                {
221✔
2956
                        Dictionary<string, CadSystemVariable> map = new Dictionary<string, CadSystemVariable>();
221✔
2957
                        foreach (PropertyInfo p in typeof(CadHeader).GetProperties())
119,119✔
2958
                        {
59,228✔
2959
                                CadSystemVariableAttribute att = p.GetCustomAttribute<CadSystemVariableAttribute>();
59,228✔
2960
                                if (att == null)
59,228✔
2961
                                        continue;
8,840✔
2962

2963
                                map.Add(att.Name, new CadSystemVariable(p));
50,388✔
2964
                        }
50,388✔
2965

2966
                        return map;
221✔
2967
                }
221✔
2968

2969
                /// <summary>
2970
                /// Set a valueo of a system variable by name
2971
                /// </summary>
2972
                /// <param name="systemvar">name of the system var</param>
2973
                /// <param name="values">parameters for the constructor of the value</param>
2974
                public void SetValue(string systemvar, params object[] values)
2975
                {
33,460✔
2976
                        PropertyExpression<CadHeader, CadSystemVariableAttribute>.Prop prop = _propertyCache.GetProperty(systemvar);
33,460✔
2977

2978
                        ConstructorInfo constr = prop.Property.PropertyType.GetConstructor(values.Select(o => o.GetType()).ToArray());
74,900✔
2979

2980
                        if (prop.Property.PropertyType.IsEnum)
33,460✔
2981
                        {
4,984✔
2982
                                int v = Convert.ToInt32(values.First());
4,984✔
2983
                                prop.Setter(this, Enum.ToObject(prop.Property.PropertyType, v));
4,984✔
2984
                        }
4,984✔
2985
                        else if (prop.Property.PropertyType.IsEquivalentTo(typeof(DateTime)))
28,476✔
2986
                        {
660✔
2987
                                double jvalue = (double)values.First();
660✔
2988

2989
                                prop.Setter(this, CadUtils.FromJulianCalendar((double)values.First()));
660✔
2990
                        }
660✔
2991
                        else if (prop.Property.PropertyType.IsEquivalentTo(typeof(TimeSpan)))
27,816✔
2992
                        {
340✔
2993
                                double jvalue = (double)values.First();
340✔
2994

2995
                                prop.Setter(this, CadUtils.EditingTime((double)values.First()));
340✔
2996
                        }
340✔
2997
                        else if (constr == null)
27,476✔
2998
                        {
22,298✔
2999
                                if (prop.Attribute.IsName && values.First() is string name)
22,298✔
3000
                                {
1,612✔
3001
                                        if (!name.IsNullOrEmpty())
1,612✔
3002
                                        {
1,000✔
3003
                                                prop.Setter(this, Convert.ChangeType(values.First(), prop.Property.PropertyType));
1,000✔
3004
                                        }
1,000✔
3005
                                }
1,612✔
3006
                                else
3007
                                {
20,686✔
3008
                                        prop.Setter(this, Convert.ChangeType(values.First(), prop.Property.PropertyType));
20,686✔
3009
                                }
20,686✔
3010
                        }
22,298✔
3011
                        else
3012
                        {
5,178✔
3013
                                prop.Setter(this, Activator.CreateInstance(prop.Property.PropertyType, values));
5,178✔
3014
                        }
5,178✔
3015
                }
33,460✔
3016

3017
                public object GetValue(string systemvar)
3018
                {
×
3019
                        var prop = _propertyCache.GetProperty(systemvar);
×
3020
                        return prop.Getter(this);
×
3021
                }
×
3022

3023
                /// <summary>
3024
                /// Get the primitive values in each dxf code
3025
                /// </summary>
3026
                /// <param name="systemvar"></param>
3027
                /// <returns>dictionary with the codes and values</returns>
3028
                public Dictionary<DxfCode, object> GetValues(string systemvar)
3029
                {
×
3030
                        Dictionary<DxfCode, object> value = null;
×
3031

3032
                        foreach (PropertyInfo p in this.GetType().GetProperties())
×
3033
                        {
×
3034
                                CadSystemVariableAttribute att = p.GetCustomAttribute<CadSystemVariableAttribute>();
×
3035
                                if (att == null)
×
3036
                                        continue;
×
3037

3038
                                if (att.Name == systemvar)
×
3039
                                {
×
3040
                                        value = new Dictionary<DxfCode, object>();
×
3041

3042
                                        if (att.ValueCodes.Length == 1)
×
3043
                                        {
×
3044
                                                value.Add(att.ValueCodes[0], p.GetValue(this));
×
3045
                                        }
×
3046
                                        else
3047
                                        {
×
3048
                                                IVector vector = (IVector)p.GetValue(this);
×
3049
                                                for (int i = 0; i < vector.Dimension; i++)
×
3050
                                                {
×
3051
                                                        value.Add(att.ValueCodes[i], vector[i]);
×
3052
                                                }
×
3053
                                        }
×
3054

3055
                                        break;
×
3056
                                }
3057
                        }
×
3058

3059
                        return value;
×
3060
                }
×
3061
        }
3062
}
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

© 2025 Coveralls, Inc