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

DomCR / ACadSharp / 29143042407

11 Jul 2026 06:34AM UTC coverage: 2.912% (-73.0%) from 75.918%
29143042407

push

github

web-flow
Merge pull request #1146 from ilCosmico/acds-read-payload-anchor

Read the AcDs payload area offset from the data segment header

264 of 12999 branches covered (2.03%)

Branch coverage included in aggregate %.

0 of 30 new or added lines in 1 file covered. (0.0%)

31243 existing lines in 465 files now uncovered.

1337 of 41984 relevant lines covered (3.18%)

5.38 hits per line

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

0.0
/src/ACadSharp/Classes/DxfClassCollection.cs
1
using System;
2
using System.Collections;
3
using System.Collections.Generic;
4
using System.Linq;
5

6
namespace ACadSharp.Classes;
7

8
/// <summary>
9
/// Represents a collection of <see cref="DxfClass"/> objects.
10
/// </summary>
11
public class DxfClassCollection : ICollection<DxfClass>
12
{
13
        /// <inheritdoc/>
UNCOV
14
        public int Count { get { return this._entries.Count; } }
×
15

16
        /// <inheritdoc/>
17
        public bool IsReadOnly => false;
×
18

19
        private readonly CadDocument _document;
20

UNCOV
21
        private readonly Dictionary<string, DxfClass> _entries = new Dictionary<string, DxfClass>(StringComparer.OrdinalIgnoreCase);
×
22

23
        /// <summary>
24
        /// Initializes a new instance of the <see cref="DxfClassCollection"/> class.
25
        /// </summary>
26
        /// <param name="document">The CAD document associated with this collection.</param>
UNCOV
27
        public DxfClassCollection(CadDocument document)
×
UNCOV
28
        {
×
UNCOV
29
                this._document = document;
×
UNCOV
30
        }
×
31

32
        /// <summary>
33
        /// Add a dxf class to the collection if the <see cref="DxfClass.DxfName"/> is not present.
34
        /// </summary>
35
        /// <param name="item">The dxf class to add.</param>
36
        public void Add(DxfClass item)
UNCOV
37
        {
×
UNCOV
38
                this._entries.Add(item.DxfName, item);
×
UNCOV
39
        }
×
40

41
        /// <summary>
42
        /// Add a dxf class to the collection or updates the existing one if the <see cref="DxfClass.DxfName"/> is already in the collection.
43
        /// </summary>
44
        /// <param name="item">The dxf class to add or update.</param>
45
        public void AddOrUpdate(DxfClass item)
UNCOV
46
        {
×
UNCOV
47
                if (this._entries.TryGetValue(item.DxfName, out DxfClass result))
×
UNCOV
48
                {
×
UNCOV
49
                        result.InstanceCount = this._document.GetInstanceCount(item.DxfName);
×
UNCOV
50
                }
×
51
                else
UNCOV
52
                {
×
UNCOV
53
                        this.Add(item);
×
UNCOV
54
                }
×
UNCOV
55
        }
×
56

57
        /// <inheritdoc/>
58
        public void Clear()
59
        {
×
60
                this._entries.Clear();
×
61
        }
×
62

63
        /// <summary>
64
        /// Determines whether the Collection contains a specific <see cref="DxfClass.DxfName"/>.
65
        /// </summary>
66
        /// <param name="dxfname">The name of the dxf class to check.</param>
67
        /// <returns>true if the Collection contains an element with the specified name; otherwise, false.</returns>
68
        public bool Contains(string dxfname)
69
        {
×
70
                return this._entries.ContainsKey(dxfname);
×
71
        }
×
72

73
        /// <inheritdoc/>
74
        public bool Contains(DxfClass item)
75
        {
×
76
                return this._entries.Values.Contains(item);
×
77
        }
×
78

79
        /// <inheritdoc/>
80
        public void CopyTo(DxfClass[] array, int arrayIndex)
81
        {
×
82
                this._entries.Values.CopyTo(array, arrayIndex);
×
83
        }
×
84

85
        /// <summary>
86
        /// Gets the dxf class associated with <see cref="DxfClass.ClassNumber"/>.
87
        /// </summary>
88
        /// <param name="id"></param>
89
        /// <returns></returns>
90
        public DxfClass GetByClassNumber(short id)
91
        {
×
92
                return this._entries.Values.FirstOrDefault(c => c.ClassNumber == id);
×
93
        }
×
94

95
        /// <summary>
96
        /// Gets the dxf class associated with <see cref="DxfClass.DxfName"/>.
97
        /// </summary>
98
        /// <param name="dxfname"></param>
99
        /// <returns></returns>
100
        public DxfClass GetByName(string dxfname)
101
        {
×
102
                if (this._entries.TryGetValue(dxfname, out DxfClass result))
×
103
                {
×
104
                        return result;
×
105
                }
106
                else
107
                {
×
108
                        return null;
×
109
                }
110
        }
×
111

112
        /// <inheritdoc/>
113
        public IEnumerator<DxfClass> GetEnumerator()
UNCOV
114
        {
×
UNCOV
115
                return this._entries.Values.GetEnumerator();
×
UNCOV
116
        }
×
117

118
        /// <inheritdoc/>
119
        IEnumerator IEnumerable.GetEnumerator()
120
        {
×
121
                return this._entries.Values.GetEnumerator();
×
122
        }
×
123

124
        /// <inheritdoc/>
125
        public bool Remove(DxfClass item)
126
        {
×
127
                return this._entries.Remove(item.DxfName);
×
128
        }
×
129

130
        /// <summary>
131
        /// Gets the dxf class associated with <see cref="DxfClass.ClassNumber"/>.
132
        /// </summary>
133
        /// <param name="id"></param>
134
        /// <param name="result"></param>
135
        /// <returns></returns>
136
        public bool TryGetByClassNumber(short id, out DxfClass result)
137
        {
×
138
                result = this._entries.Values.FirstOrDefault(c => c.ClassNumber == id);
×
139
                return result != null;
×
140
        }
×
141

142
        /// <summary>
143
        /// Gets the dxf class associated with <see cref="DxfClass.DxfName"/>.
144
        /// </summary>
145
        /// <param name="dxfname"></param>
146
        /// <param name="result"></param>
147
        /// <returns>true if the Collection contains an element with the specified key; otherwise, false.</returns>
148
        public bool TryGetByName(string dxfname, out DxfClass result)
UNCOV
149
        {
×
UNCOV
150
                return this._entries.TryGetValue(dxfname, out result);
×
UNCOV
151
        }
×
152

153
        /// <summary>
154
        /// Updates the DXF class collection in the document with a predefined set of class definitions and resets class
155
        /// numbers.
156
        /// </summary>
157
        public void UpdateDxfClasses()
UNCOV
158
        {
×
UNCOV
159
                this.resetClassNumbers();
×
160

161
                //AcDbDictionaryWithDefault
UNCOV
162
                this.AddOrUpdate(new DxfClass
×
UNCOV
163
                {
×
UNCOV
164
                        CppClassName = DxfSubclassMarker.DictionaryWithDefault,
×
UNCOV
165
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
166
                        DwgVersion = (ACadVersion)22,
×
UNCOV
167
                        DxfName = DxfFileToken.ObjectDictionaryWithDefault,
×
UNCOV
168
                        ItemClassId = 499,
×
UNCOV
169
                        MaintenanceVersion = 42,
×
UNCOV
170
                        ProxyFlags = ProxyFlags.R13FormatProxy,
×
UNCOV
171
                        WasZombie = false,
×
UNCOV
172
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectDictionaryWithDefault),
×
UNCOV
173
                });
×
174

175
                //AcDbPlaceHolder
UNCOV
176
                this.AddOrUpdate(new DxfClass
×
UNCOV
177
                {
×
UNCOV
178
                        CppClassName = DxfSubclassMarker.AcDbPlaceHolder,
×
UNCOV
179
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
180
                        DwgVersion = (ACadVersion)0,
×
UNCOV
181
                        DxfName = DxfFileToken.ObjectPlaceholder,
×
UNCOV
182
                        ItemClassId = 499,
×
UNCOV
183
                        MaintenanceVersion = 0,
×
UNCOV
184
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
185
                        WasZombie = false,
×
UNCOV
186
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectPlaceholder),
×
UNCOV
187
                });
×
188

189
                //AcDbLayout
UNCOV
190
                this.AddOrUpdate(new DxfClass
×
UNCOV
191
                {
×
UNCOV
192
                        CppClassName = DxfSubclassMarker.Layout,
×
UNCOV
193
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
194
                        DwgVersion = (ACadVersion)0,
×
UNCOV
195
                        DxfName = DxfFileToken.ObjectLayout,
×
UNCOV
196
                        ItemClassId = 499,
×
UNCOV
197
                        MaintenanceVersion = 0,
×
UNCOV
198
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
199
                        WasZombie = false,
×
UNCOV
200
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectLayout),
×
UNCOV
201
                });
×
202

203
                //AcDbDictionaryVar
UNCOV
204
                this.AddOrUpdate(new DxfClass
×
UNCOV
205
                {
×
UNCOV
206
                        CppClassName = DxfSubclassMarker.DictionaryVar,
×
UNCOV
207
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
208
                        DwgVersion = (ACadVersion)20,
×
UNCOV
209
                        DxfName = DxfFileToken.ObjectDictionaryVar,
×
UNCOV
210
                        ItemClassId = 499,
×
UNCOV
211
                        MaintenanceVersion = 0,
×
UNCOV
212
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
213
                        WasZombie = false,
×
UNCOV
214
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectDictionaryVar),
×
UNCOV
215
                });
×
216

217
                //AcDbTableStyle
UNCOV
218
                this.AddOrUpdate(new DxfClass
×
UNCOV
219
                {
×
UNCOV
220
                        CppClassName = DxfSubclassMarker.TableStyle,
×
UNCOV
221
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
222
                        DwgVersion = ACadVersion.AC1018,
×
UNCOV
223
                        DxfName = DxfFileToken.ObjectTableStyle,
×
UNCOV
224
                        ItemClassId = 499,
×
UNCOV
225
                        MaintenanceVersion = 0,
×
UNCOV
226
                        ProxyFlags = (ProxyFlags)4095,
×
UNCOV
227
                        WasZombie = false,
×
UNCOV
228
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectTableStyle),
×
UNCOV
229
                });
×
230

231
                //AcDbMaterial
UNCOV
232
                this.AddOrUpdate(new DxfClass
×
UNCOV
233
                {
×
UNCOV
234
                        CppClassName = DxfSubclassMarker.Material,
×
UNCOV
235
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
236
                        DwgVersion = 0,
×
UNCOV
237
                        DxfName = DxfFileToken.ObjectMaterial,
×
UNCOV
238
                        ItemClassId = 499,
×
UNCOV
239
                        MaintenanceVersion = 0,
×
UNCOV
240
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
241
                        WasZombie = false,
×
UNCOV
242
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectMaterial),
×
UNCOV
243
                });
×
244

245
                //AcDbVisualStyle
UNCOV
246
                this.AddOrUpdate(new DxfClass
×
UNCOV
247
                {
×
UNCOV
248
                        CppClassName = DxfSubclassMarker.VisualStyle,
×
UNCOV
249
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
250
                        DwgVersion = ACadVersion.AC1021,
×
UNCOV
251
                        DxfName = DxfFileToken.ObjectVisualStyle,
×
UNCOV
252
                        ItemClassId = 499,
×
UNCOV
253
                        MaintenanceVersion = 0,
×
UNCOV
254
                        ProxyFlags = (ProxyFlags)4095,
×
UNCOV
255
                        WasZombie = false,
×
UNCOV
256
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectVisualStyle),
×
UNCOV
257
                });
×
258

259
                //AcDbScale
UNCOV
260
                this.AddOrUpdate(new DxfClass
×
UNCOV
261
                {
×
UNCOV
262
                        CppClassName = DxfSubclassMarker.Scale,
×
UNCOV
263
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
264
                        DwgVersion = ACadVersion.AC1021,
×
UNCOV
265
                        DxfName = DxfFileToken.ObjectScale,
×
UNCOV
266
                        ItemClassId = 499,
×
UNCOV
267
                        MaintenanceVersion = 1,
×
UNCOV
268
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
269
                        WasZombie = false,
×
UNCOV
270
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectScale),
×
UNCOV
271
                });
×
272

273
                //AcDbMLeaderStyle
UNCOV
274
                this.AddOrUpdate(new DxfClass
×
UNCOV
275
                {
×
UNCOV
276
                        CppClassName = DxfSubclassMarker.MLeaderStyle,
×
UNCOV
277
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
278
                        DwgVersion = ACadVersion.AC1021,
×
UNCOV
279
                        DxfName = DxfFileToken.ObjectMLeaderStyle,
×
UNCOV
280
                        ItemClassId = 499,
×
UNCOV
281
                        MaintenanceVersion = 25,
×
UNCOV
282
                        ProxyFlags = (ProxyFlags)4095,
×
UNCOV
283
                        WasZombie = false,
×
UNCOV
284
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectMLeaderStyle),
×
UNCOV
285
                });
×
286

287
                //AcDbCellStyleMap
UNCOV
288
                this.AddOrUpdate(new DxfClass
×
UNCOV
289
                {
×
UNCOV
290
                        CppClassName = DxfSubclassMarker.CellStyleMap,
×
UNCOV
291
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
292
                        DwgVersion = ACadVersion.AC1021,
×
UNCOV
293
                        DxfName = DxfFileToken.ObjectCellStyleMap,
×
UNCOV
294
                        ItemClassId = 499,
×
UNCOV
295
                        MaintenanceVersion = 25,
×
UNCOV
296
                        ProxyFlags = ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
297
                        WasZombie = false,
×
UNCOV
298
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectCellStyleMap),
×
UNCOV
299
                });
×
300

301
                //ExAcXREFPanelObject
UNCOV
302
                this.AddOrUpdate(new DxfClass
×
UNCOV
303
                {
×
UNCOV
304
                        CppClassName = "ExAcXREFPanelObject",
×
UNCOV
305
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
306
                        DwgVersion = 0,
×
UNCOV
307
                        DxfName = "EXACXREFPANELOBJECT",
×
UNCOV
308
                        ItemClassId = 499,
×
UNCOV
309
                        MaintenanceVersion = 0,
×
UNCOV
310
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
311
                        WasZombie = false,
×
UNCOV
312
                        InstanceCount = this._document.GetInstanceCount("EXACXREFPANELOBJECT"),
×
UNCOV
313
                });
×
314

315
                //AcDbImpNonPersistentObjectsCollection
UNCOV
316
                this.AddOrUpdate(new DxfClass
×
UNCOV
317
                {
×
UNCOV
318
                        CppClassName = "AcDbImpNonPersistentObjectsCollection",
×
UNCOV
319
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
320
                        DwgVersion = 0,
×
UNCOV
321
                        DxfName = "NPOCOLLECTION",
×
UNCOV
322
                        ItemClassId = 499,
×
UNCOV
323
                        MaintenanceVersion = 0,
×
UNCOV
324
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
325
                        WasZombie = false,
×
UNCOV
326
                        InstanceCount = this._document.GetInstanceCount("NPOCOLLECTION"),
×
UNCOV
327
                });
×
328

329
                //AcDbLayerIndex
UNCOV
330
                this.AddOrUpdate(new DxfClass
×
UNCOV
331
                {
×
UNCOV
332
                        CppClassName = "AcDbLayerIndex",
×
UNCOV
333
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
334
                        DwgVersion = 0,
×
UNCOV
335
                        DxfName = "LAYER_INDEX",
×
UNCOV
336
                        ItemClassId = 499,
×
UNCOV
337
                        MaintenanceVersion = 0,
×
UNCOV
338
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
339
                        WasZombie = false,
×
UNCOV
340
                        InstanceCount = this._document.GetInstanceCount("LAYER_INDEX"),
×
UNCOV
341
                });
×
342

343
                //AcDbSpatialIndex
UNCOV
344
                this.AddOrUpdate(new DxfClass
×
UNCOV
345
                {
×
UNCOV
346
                        CppClassName = "AcDbSpatialIndex",
×
UNCOV
347
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
348
                        DwgVersion = 0,
×
UNCOV
349
                        DxfName = "SPATIAL_INDEX",
×
UNCOV
350
                        ItemClassId = 499,
×
UNCOV
351
                        MaintenanceVersion = 0,
×
UNCOV
352
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
353
                        WasZombie = false,
×
UNCOV
354
                        InstanceCount = this._document.GetInstanceCount("SPATIAL_INDEX"),
×
UNCOV
355
                });
×
356

357
                //AcDbIdBuffer
UNCOV
358
                this.AddOrUpdate(new DxfClass
×
UNCOV
359
                {
×
UNCOV
360
                        CppClassName = "AcDbIdBuffer",
×
UNCOV
361
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
362
                        DwgVersion = ACadVersion.AC1014,
×
UNCOV
363
                        DxfName = "IDBUFFER",
×
UNCOV
364
                        ItemClassId = 499,
×
UNCOV
365
                        MaintenanceVersion = 0,
×
UNCOV
366
                        ProxyFlags = ProxyFlags.R13FormatProxy,
×
UNCOV
367
                        WasZombie = false,
×
UNCOV
368
                        InstanceCount = this._document.GetInstanceCount("IDBUFFER"),
×
UNCOV
369
                });
×
370

371
                //AcDbSectionViewStyle
UNCOV
372
                this.AddOrUpdate(new DxfClass
×
UNCOV
373
                {
×
UNCOV
374
                        CppClassName = "AcDbSectionViewStyle",
×
UNCOV
375
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
376
                        DwgVersion = 0,
×
UNCOV
377
                        DxfName = "ACDBSECTIONVIEWSTYLE",
×
UNCOV
378
                        ItemClassId = 499,
×
UNCOV
379
                        MaintenanceVersion = 0,
×
UNCOV
380
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
381
                        WasZombie = false,
×
UNCOV
382
                        InstanceCount = this._document.GetInstanceCount("ACDBSECTIONVIEWSTYLE"),
×
UNCOV
383
                });
×
384

385
                //AcDbDetailViewStyle
UNCOV
386
                this.AddOrUpdate(new DxfClass
×
UNCOV
387
                {
×
UNCOV
388
                        CppClassName = "AcDbDetailViewStyle",
×
UNCOV
389
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
390
                        DwgVersion = 0,
×
UNCOV
391
                        DxfName = "ACDBDETAILVIEWSTYLE",
×
UNCOV
392
                        ItemClassId = 499,
×
UNCOV
393
                        MaintenanceVersion = 0,
×
UNCOV
394
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
395
                        WasZombie = false,
×
UNCOV
396
                        InstanceCount = this._document.GetInstanceCount("ACDBDETAILVIEWSTYLE"),
×
UNCOV
397
                });
×
398

399
                //AcDbSubDMesh
UNCOV
400
                this.AddOrUpdate(new DxfClass
×
UNCOV
401
                {
×
UNCOV
402
                        CppClassName = DxfSubclassMarker.Mesh,
×
UNCOV
403
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
404
                        DwgVersion = 0,
×
UNCOV
405
                        DxfName = DxfFileToken.EntityMesh,
×
UNCOV
406
                        ItemClassId = 498,
×
UNCOV
407
                        MaintenanceVersion = 0,
×
UNCOV
408
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
409
                        WasZombie = false,
×
UNCOV
410
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.EntityMesh),
×
UNCOV
411
                });
×
412

413
                //AcDbSortentsTable
UNCOV
414
                this.AddOrUpdate(new DxfClass
×
UNCOV
415
                {
×
UNCOV
416
                        CppClassName = DxfSubclassMarker.SortentsTable,
×
UNCOV
417
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
418
                        DwgVersion = ACadVersion.AC1014,
×
UNCOV
419
                        DxfName = DxfFileToken.ObjectSortEntsTable,
×
UNCOV
420
                        ItemClassId = 499,
×
UNCOV
421
                        MaintenanceVersion = 0,
×
UNCOV
422
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
423
                        WasZombie = false,
×
UNCOV
424
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectSortEntsTable),
×
UNCOV
425
                });
×
426

427
                //AcDbTextObjectContextData
UNCOV
428
                this.AddOrUpdate(new DxfClass
×
UNCOV
429
                {
×
UNCOV
430
                        CppClassName = "AcDbTextObjectContextData",
×
UNCOV
431
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
432
                        DwgVersion = 0,
×
UNCOV
433
                        DxfName = "ACDB_TEXTOBJECTCONTEXTDATA_CLASS",
×
UNCOV
434
                        ItemClassId = 499,
×
UNCOV
435
                        MaintenanceVersion = 0,
×
UNCOV
436
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
437
                        WasZombie = false,
×
UNCOV
438
                        InstanceCount = this._document.GetInstanceCount("ACDB_TEXTOBJECTCONTEXTDATA_CLASS"),
×
UNCOV
439
                });
×
440

441
                //AcDbWipeout
UNCOV
442
                this.AddOrUpdate(new DxfClass
×
UNCOV
443
                {
×
UNCOV
444
                        ApplicationName = "WipeOut",
×
UNCOV
445
                        CppClassName = DxfSubclassMarker.Wipeout,
×
UNCOV
446
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
447
                        DwgVersion = ACadVersion.AC1015,
×
UNCOV
448
                        DxfName = DxfFileToken.EntityWipeout,
×
UNCOV
449
                        ItemClassId = 498,
×
UNCOV
450
                        MaintenanceVersion = 0,
×
UNCOV
451
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.TransformAllowed | ProxyFlags.ColorChangeAllowed | ProxyFlags.LayerChangeAllowed | ProxyFlags.LinetypeChangeAllowed | ProxyFlags.LinetypeScaleChangeAllowed | ProxyFlags.VisibilityChangeAllowed | ProxyFlags.R13FormatProxy,
×
UNCOV
452
                        WasZombie = false,
×
UNCOV
453
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.EntityWipeout),
×
UNCOV
454
                });
×
455

456
                //AcDbWipeoutVariables
UNCOV
457
                this.AddOrUpdate(new DxfClass
×
UNCOV
458
                {
×
UNCOV
459
                        ApplicationName = "WipeOut",
×
UNCOV
460
                        CppClassName = "AcDbWipeoutVariables",
×
UNCOV
461
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
462
                        DwgVersion = ACadVersion.AC1015,
×
UNCOV
463
                        DxfName = "WIPEOUTVARIABLES",
×
UNCOV
464
                        ItemClassId = 499,
×
UNCOV
465
                        MaintenanceVersion = 0,
×
UNCOV
466
                        ProxyFlags = ProxyFlags.R13FormatProxy,
×
UNCOV
467
                        WasZombie = false,
×
UNCOV
468
                        InstanceCount = this._document.GetInstanceCount("WIPEOUTVARIABLES"),
×
UNCOV
469
                });
×
470

471
                //AcDbDimAssoc
UNCOV
472
                this.AddOrUpdate(new DxfClass
×
UNCOV
473
                {
×
UNCOV
474
                        ApplicationName = "AcDbDimAssoc",
×
UNCOV
475
                        CppClassName = "AcDbDimAssoc",
×
UNCOV
476
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
477
                        DwgVersion = 0,
×
UNCOV
478
                        DxfName = "DIMASSOC",
×
UNCOV
479
                        ItemClassId = 499,
×
UNCOV
480
                        MaintenanceVersion = 0,
×
UNCOV
481
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
482
                        WasZombie = false,
×
UNCOV
483
                        InstanceCount = this._document.GetInstanceCount("DIMASSOC"),
×
UNCOV
484
                });
×
485

486
                //AcDbTable
UNCOV
487
                this.AddOrUpdate(new DxfClass
×
UNCOV
488
                {
×
UNCOV
489
                        CppClassName = DxfSubclassMarker.TableEntity,
×
UNCOV
490
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
491
                        DwgVersion = ACadVersion.AC1018,
×
UNCOV
492
                        DxfName = DxfFileToken.EntityTable,
×
UNCOV
493
                        ItemClassId = 498,
×
UNCOV
494
                        MaintenanceVersion = 0,
×
UNCOV
495
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
496
                        WasZombie = false,
×
UNCOV
497
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.EntityTable),
×
UNCOV
498
                });
×
499

500
                //AcDbTableContent
UNCOV
501
                this.AddOrUpdate(new DxfClass
×
UNCOV
502
                {
×
UNCOV
503
                        CppClassName = DxfSubclassMarker.TableContent,
×
UNCOV
504
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
505
                        DwgVersion = ACadVersion.AC1018,
×
UNCOV
506
                        DxfName = DxfFileToken.ObjectTableContent,
×
UNCOV
507
                        ItemClassId = 499,
×
UNCOV
508
                        MaintenanceVersion = 21,
×
UNCOV
509
                        ProxyFlags = ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
510
                        WasZombie = false,
×
UNCOV
511
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectTableContent),
×
UNCOV
512
                });
×
513

514
                //AcDbTableGeometry
UNCOV
515
                this.AddOrUpdate(new DxfClass
×
UNCOV
516
                {
×
UNCOV
517
                        CppClassName = "AcDbTableGeometry",
×
UNCOV
518
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
519
                        DwgVersion = 0,
×
UNCOV
520
                        DxfName = "TABLEGEOMETRY",
×
UNCOV
521
                        ItemClassId = 499,
×
UNCOV
522
                        MaintenanceVersion = 0,
×
UNCOV
523
                        ProxyFlags = ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
524
                        WasZombie = false,
×
UNCOV
525
                        InstanceCount = this._document.GetInstanceCount("TABLEGEOMETRY"),
×
UNCOV
526
                });
×
527

528
                //AcDbRasterImage
UNCOV
529
                this.AddOrUpdate(new DxfClass
×
UNCOV
530
                {
×
UNCOV
531
                        ApplicationName = "ISM",
×
UNCOV
532
                        CppClassName = DxfSubclassMarker.RasterImage,
×
UNCOV
533
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
534
                        DwgVersion = (ACadVersion)20,
×
UNCOV
535
                        DxfName = DxfFileToken.EntityImage,
×
UNCOV
536
                        ItemClassId = 498,
×
UNCOV
537
                        MaintenanceVersion = 0,
×
UNCOV
538
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.TransformAllowed | ProxyFlags.ColorChangeAllowed | ProxyFlags.LayerChangeAllowed | ProxyFlags.LinetypeChangeAllowed | ProxyFlags.LinetypeScaleChangeAllowed | ProxyFlags.VisibilityChangeAllowed | ProxyFlags.R13FormatProxy,
×
UNCOV
539
                        WasZombie = false,
×
UNCOV
540
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.EntityImage),
×
UNCOV
541
                });
×
542

543
                //AcDbRasterImageDef
UNCOV
544
                this.AddOrUpdate(new DxfClass
×
UNCOV
545
                {
×
UNCOV
546
                        ApplicationName = "ISM",
×
UNCOV
547
                        CppClassName = DxfSubclassMarker.RasterImageDef,
×
UNCOV
548
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
549
                        DwgVersion = (ACadVersion)20,
×
UNCOV
550
                        DxfName = DxfFileToken.ObjectImageDefinition,
×
UNCOV
551
                        ItemClassId = 499,
×
UNCOV
552
                        MaintenanceVersion = 0,
×
UNCOV
553
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
554
                        WasZombie = false,
×
UNCOV
555
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectImageDefinition),
×
UNCOV
556
                });
×
557

558
                ////AcDbRasterImageDefReactor
UNCOV
559
                this.AddOrUpdate(new DxfClass
×
UNCOV
560
                {
×
UNCOV
561
                        ApplicationName = "ISM",
×
UNCOV
562
                        CppClassName = DxfSubclassMarker.RasterImageDefReactor,
×
UNCOV
563
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
564
                        DwgVersion = (ACadVersion)20,
×
UNCOV
565
                        DxfName = DxfFileToken.ObjectImageDefinitionReactor,
×
UNCOV
566
                        ItemClassId = 499,
×
UNCOV
567
                        MaintenanceVersion = 0,
×
UNCOV
568
                        ProxyFlags = ProxyFlags.EraseAllowed,
×
UNCOV
569
                        WasZombie = false,
×
UNCOV
570
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectImageDefinitionReactor),
×
UNCOV
571
                });
×
572

573
                //AcDbColor
UNCOV
574
                this.AddOrUpdate(new DxfClass
×
UNCOV
575
                {
×
UNCOV
576
                        CppClassName = DxfSubclassMarker.DbColor,
×
UNCOV
577
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
578
                        DwgVersion = ACadVersion.AC1015,
×
UNCOV
579
                        DxfName = DxfFileToken.ObjectDBColor,
×
UNCOV
580
                        ItemClassId = 499,
×
UNCOV
581
                        MaintenanceVersion = 14,
×
UNCOV
582
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
583
                        WasZombie = false,
×
UNCOV
584
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectDBColor),
×
UNCOV
585
                });
×
586

587
                //AcDbGeoData
UNCOV
588
                this.AddOrUpdate(new DxfClass
×
UNCOV
589
                {
×
UNCOV
590
                        CppClassName = DxfSubclassMarker.GeoData,
×
UNCOV
591
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
592
                        DwgVersion = ACadVersion.AC1021,
×
UNCOV
593
                        DxfName = DxfFileToken.ObjectGeoData,
×
UNCOV
594
                        ItemClassId = 499,
×
UNCOV
595
                        MaintenanceVersion = 45,
×
UNCOV
596
                        ProxyFlags = (ProxyFlags)4095,
×
UNCOV
597
                        WasZombie = false,
×
UNCOV
598
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectGeoData),
×
UNCOV
599
                });
×
600

601
                //AcDbMLeader
UNCOV
602
                this.AddOrUpdate(new DxfClass
×
UNCOV
603
                {
×
UNCOV
604
                        CppClassName = DxfSubclassMarker.MultiLeader,
×
UNCOV
605
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
606
                        DwgVersion = ACadVersion.MC0_0,
×
UNCOV
607
                        DxfName = DxfFileToken.EntityMultiLeader,
×
UNCOV
608
                        ItemClassId = 499,
×
UNCOV
609
                        MaintenanceVersion = 0,
×
UNCOV
610
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
611
                        WasZombie = false,
×
UNCOV
612
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.EntityMultiLeader),
×
UNCOV
613
                });
×
614

615
                //AcDbPdfReference
UNCOV
616
                this.AddOrUpdate(new DxfClass
×
UNCOV
617
                {
×
UNCOV
618
                        CppClassName = DxfSubclassMarker.PdfReference,
×
UNCOV
619
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
620
                        DwgVersion = (ACadVersion)26,
×
UNCOV
621
                        DxfName = DxfFileToken.EntityPdfUnderlay,
×
UNCOV
622
                        ItemClassId = 498,
×
UNCOV
623
                        MaintenanceVersion = 0,
×
UNCOV
624
                        ProxyFlags = (ProxyFlags)4095,
×
UNCOV
625
                        WasZombie = false,
×
UNCOV
626
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.EntityPdfUnderlay),
×
UNCOV
627
                });
×
628

629
                //AcDbPdfDefinition
UNCOV
630
                this.AddOrUpdate(new DxfClass
×
UNCOV
631
                {
×
UNCOV
632
                        CppClassName = DxfSubclassMarker.PdfDefinition,
×
UNCOV
633
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
634
                        DwgVersion = (ACadVersion)26,
×
UNCOV
635
                        DxfName = DxfFileToken.ObjectPdfDefinition,
×
UNCOV
636
                        ItemClassId = 499,
×
UNCOV
637
                        MaintenanceVersion = 0,
×
UNCOV
638
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
639
                        WasZombie = false,
×
UNCOV
640
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectPdfDefinition),
×
UNCOV
641
                });
×
642

643
                //AcDbRasterVariables
UNCOV
644
                this.AddOrUpdate(new DxfClass
×
UNCOV
645
                {
×
UNCOV
646
                        ApplicationName = "ISM",
×
UNCOV
647
                        CppClassName = DxfSubclassMarker.RasterVariables,
×
UNCOV
648
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
649
                        DwgVersion = (ACadVersion)20,
×
UNCOV
650
                        DxfName = DxfFileToken.ObjectRasterVariables,
×
UNCOV
651
                        ItemClassId = 499,
×
UNCOV
652
                        MaintenanceVersion = 0,
×
UNCOV
653
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
654
                        WasZombie = false,
×
UNCOV
655
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectRasterVariables),
×
UNCOV
656
                });
×
657

658
                //AcDbSpatialFilter
UNCOV
659
                this.AddOrUpdate(new DxfClass
×
UNCOV
660
                {
×
UNCOV
661
                        CppClassName = DxfSubclassMarker.SpatialFilter,
×
UNCOV
662
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
663
                        DwgVersion = (ACadVersion)20,
×
UNCOV
664
                        DxfName = DxfFileToken.ObjectSpatialFilter,
×
UNCOV
665
                        ItemClassId = 499,
×
UNCOV
666
                        MaintenanceVersion = 0,
×
UNCOV
667
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
668
                        WasZombie = false,
×
UNCOV
669
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectSpatialFilter),
×
UNCOV
670
                });
×
671

672
                //AcDbMLeaderObjectContextData
UNCOV
673
                this.AddOrUpdate(new DxfClass
×
UNCOV
674
                {
×
UNCOV
675
                        CppClassName = DxfSubclassMarker.MultiLeaderObjectContextData,
×
UNCOV
676
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
677
                        DwgVersion = ACadVersion.MC0_0,
×
UNCOV
678
                        DxfName = DxfFileToken.ObjectMLeaderContextData,
×
UNCOV
679
                        ItemClassId = 499,
×
UNCOV
680
                        MaintenanceVersion = 0,
×
UNCOV
681
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
682
                        WasZombie = false,
×
UNCOV
683
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectMLeaderContextData),
×
UNCOV
684
                });
×
685

686
                //AcDbPlotSettings
UNCOV
687
                this.AddOrUpdate(new DxfClass
×
UNCOV
688
                {
×
UNCOV
689
                        CppClassName = DxfSubclassMarker.PlotSettings,
×
UNCOV
690
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
691
                        DwgVersion = ACadVersion.AC1015,
×
UNCOV
692
                        DxfName = DxfFileToken.ObjectPlotSettings,
×
UNCOV
693
                        ItemClassId = 499,
×
UNCOV
694
                        MaintenanceVersion = 42,
×
UNCOV
695
                        ProxyFlags = ProxyFlags.None,
×
UNCOV
696
                        WasZombie = false,
×
UNCOV
697
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectPlotSettings),
×
UNCOV
698
                });
×
699

700
                //AcDbField
UNCOV
701
                this.AddOrUpdate(new DxfClass
×
UNCOV
702
                {
×
UNCOV
703
                        CppClassName = DxfSubclassMarker.Field,
×
UNCOV
704
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
705
                        DwgVersion = ACadVersion.AC1018,
×
UNCOV
706
                        DxfName = DxfFileToken.ObjectField,
×
UNCOV
707
                        ItemClassId = 499,
×
UNCOV
708
                        MaintenanceVersion = 0,
×
UNCOV
709
                        ProxyFlags = ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
710
                        WasZombie = false,
×
UNCOV
711
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectField),
×
UNCOV
712
                });
×
713

714
                //AcDbFieldList
UNCOV
715
                this.AddOrUpdate(new DxfClass
×
UNCOV
716
                {
×
UNCOV
717
                        CppClassName = DxfSubclassMarker.FieldList,
×
UNCOV
718
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
719
                        DwgVersion = ACadVersion.AC1018,
×
UNCOV
720
                        DxfName = DxfFileToken.ObjectFieldList,
×
UNCOV
721
                        ItemClassId = 499,
×
UNCOV
722
                        MaintenanceVersion = 0,
×
UNCOV
723
                        ProxyFlags = ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
724
                        WasZombie = false,
×
UNCOV
725
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.ObjectFieldList),
×
UNCOV
726
                });
×
727

728
                //AcDbMTextAttributeObjectContextData
UNCOV
729
                this.AddOrUpdate(new DxfClass
×
UNCOV
730
                {
×
UNCOV
731
                        CppClassName = DxfSubclassMarker.MTextAttributeObjectContextData,
×
UNCOV
732
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
733
                        DwgVersion = ACadVersion.AC1021,
×
UNCOV
734
                        DxfName = DxfFileToken.MTextAttributeObjectContextData,
×
UNCOV
735
                        ItemClassId = 499,
×
UNCOV
736
                        MaintenanceVersion = 0,
×
UNCOV
737
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
738
                        WasZombie = false,
×
UNCOV
739
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.MTextAttributeObjectContextData),
×
UNCOV
740
                });
×
741

742
                //AcDbBlkRefObjectContextData
UNCOV
743
                this.AddOrUpdate(new DxfClass
×
UNCOV
744
                {
×
UNCOV
745
                        CppClassName = DxfSubclassMarker.BlkRefObjectContextData,
×
UNCOV
746
                        ClassNumber = (short)(500 + this.Count),
×
UNCOV
747
                        DwgVersion = ACadVersion.AC1021,
×
UNCOV
748
                        DxfName = DxfFileToken.BlkRefObjectContextData,
×
UNCOV
749
                        ItemClassId = 499,
×
UNCOV
750
                        MaintenanceVersion = 0,
×
UNCOV
751
                        ProxyFlags = ProxyFlags.EraseAllowed | ProxyFlags.CloningAllowed | ProxyFlags.DisablesProxyWarningDialog,
×
UNCOV
752
                        WasZombie = false,
×
UNCOV
753
                        InstanceCount = this._document.GetInstanceCount(DxfFileToken.BlkRefObjectContextData),
×
UNCOV
754
                });
×
UNCOV
755
        }
×
756

757
        private void resetClassNumbers()
UNCOV
758
        {
×
UNCOV
759
                var arr = this._entries.Values.ToArray();
×
UNCOV
760
                for (int i = 0; i < arr.Length; i++)
×
UNCOV
761
                {
×
UNCOV
762
                        arr[i].ClassNumber = (short)(500 + i);
×
UNCOV
763
                }
×
UNCOV
764
        }
×
765
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc