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

DomCR / ACadSharp / 25257777259

02 May 2026 05:35PM UTC coverage: 76.965% (-0.1%) from 77.076%
25257777259

push

github

web-flow
Merge pull request #1040 from DomCR/issue/1000_tableentity-DwgWriter

TableEntity dwg support

8557 of 12075 branches covered (70.87%)

Branch coverage included in aggregate %.

960 of 1507 new or added lines in 29 files covered. (63.7%)

38 existing lines in 5 files now uncovered.

30799 of 39060 relevant lines covered (78.85%)

152916.22 hits per line

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

78.38
/src/ACadSharp/Entities/TableEntity.Cell.cs
1
using ACadSharp.Attributes;
2
using System.Collections.Generic;
3
using System.Linq;
4
using static ACadSharp.Objects.TableStyle;
5

6
namespace ACadSharp.Entities;
7

8
public partial class TableEntity
9
{
10
        public partial class Cell
11
        {
12
                /// <summary>
13
                /// Boolean flag indicating if the auto fit option is set for the cell.
14
                /// </summary>
15
                [DxfCodeValue(174)]
16
                public bool AutoFit { get; set; }
11,644✔
17

18
                /// <summary>
19
                /// Gets or sets the scale factor applied to the block reference.
20
                /// </summary>
21
                /// <remarks>A value of 1.0 represents the original size of the block. Values greater than 1.0 increase the
22
                /// size, while values less than 1.0 decrease it. Negative values may mirror the block depending on the
23
                /// context.</remarks>
24
                [DxfCodeValue(144)]
25
                public double BlockScale { get; set; }
160✔
26

27
                /// <summary>
28
                /// Cell border height.
29
                /// </summary>
30
                /// <remarks>
31
                /// Applicable only for merged cells.
32
                /// </remarks>
33
                [DxfCodeValue(176)]
34
                public int BorderHeight { get; set; }
11,644✔
35

36
                /// <summary>
37
                /// Cell border width.
38
                /// </summary>
39
                /// <remarks>
40
                /// Applicable only for merged cells.
41
                /// </remarks>
42
                [DxfCodeValue(175)]
43
                public int BorderWidth { get; set; }
11,644✔
44

45
                /// <summary>
46
                /// Gets the single cell content if available; otherwise, returns null.
47
                /// </summary>
48
                /// <remarks>If the cell contains multiple content items or no content, this property returns null. Use this
49
                /// property when you expect the cell to have at most one content item.</remarks>
50
                public CellContent Content
51
                {
52
                        get
53
                        {
3,491✔
54
                                if (this.Contents == null || this.HasMultipleContent)
3,491!
NEW
55
                                {
×
NEW
56
                                        return null;
×
57
                                }
58
                                else
59
                                {
3,491✔
60
                                        return this.Contents.FirstOrDefault();
3,491✔
61
                                }
62
                        }
3,491✔
63
                }
64

65
                /// <summary>
66
                /// Gets the collection of cell contents contained in this instance.
67
                /// </summary>
68
                public List<CellContent> Contents { get; } = new();
46,970✔
69

70
                /// <summary>
71
                /// Gets or sets the custom data value associated with this cell.
72
                /// </summary>
73
                [DxfCodeValue(91)]
74
                public int CustomData { get; set; }
13,340✔
75

76
                /// <summary>
77
                /// Gets or sets the collection of custom data entries associated with this instance.
78
                /// </summary>
79
                public List<CustomDataEntry> CustomDataCollection { get; set; } = new();
21,880✔
80

81
                /// <summary>
82
                /// Cell flag value.
83
                /// </summary>
84
                [DxfCodeValue(172)]
85
                public short EdgeFlags { get; set; }
11,644✔
86

87
                /// <summary>
88
                /// Gets or sets the geometric layout information for the cell content.
89
                /// </summary>
90
                public CellContentGeometry Geometry { get; set; }
4,200✔
91

92
                /// <summary>
93
                /// Gets or sets a value indicating whether the entity has linked data associated with it.
94
                /// </summary>
95
                [DxfCodeValue(92)]
96
                public bool HasLinkedData { get; set; }
10,808✔
97

98
                /// <summary>
99
                /// Gets a value indicating whether the instance contains more than one content item.
100
                /// </summary>
101
                public bool HasMultipleContent
102
                {
103
                        get
104
                        {
3,510✔
105
                                if (this.Contents == null)
3,510!
UNCOV
106
                                {
×
NEW
107
                                        return false;
×
108
                                }
109

110
                                return this.Contents.Count > 1;
3,510✔
111
                        }
3,510✔
112
                }
113

114
                /// <summary>
115
                /// Cell merged value.
116
                /// </summary>
117
                [DxfCodeValue(173)]
118
                public short MergedValue { get; set; }
11,644✔
119

120
                /// <summary>
121
                /// Rotation value.
122
                /// </summary>
123
                /// <remarks>
124
                /// Applicable for a block-type cell and a text-type cell.
125
                /// </remarks>
126
                [DxfCodeValue(145)]
127
                public double Rotation { get; set; }
11,644✔
128

129
                /// <summary>
130
                /// Gets or sets the state flags that describe the current state of the table cell.
131
                /// </summary>
132
                [DxfCodeValue(90)]
133
                public TableCellStateFlags StateFlags { get; set; }
13,212✔
134

135
                /// <summary>
136
                /// Gets or sets the style applied to the cell.
137
                /// </summary>
NEW
138
                public CellStyle Style { get; set; }
×
139

140
                /// <summary>
141
                /// Gets or sets the style that overrides the default cell appearance.
142
                /// </summary>
143
                /// <remarks>When set, this style takes precedence over any default or inherited cell styles. Use this
144
                /// property to apply custom formatting or visual changes to an individual cell without affecting other
145
                /// cells.</remarks>
146
                public CellStyle StyleOverride { get; private set; } = new CellStyle { HasData = false };
39,680✔
147

148
                /// <summary>
149
                /// Gets or sets the tooltip text associated with the cell, providing additional information or context when
150
                /// the user hovers over the cell.
151
                /// </summary>
152
                [DxfCodeValue(300)]
153
                public string ToolTip { get; set; }
7,836✔
154

155
                /// <summary>
156
                /// Cell type.
157
                /// </summary>
158
                [DxfCodeValue(171)]
159
                public CellType Type { get; set; }
14,924✔
160

161
                /// <summary>
162
                /// Flag value for a virtual edge.
163
                /// </summary>
164
                [DxfCodeValue(178)]
165
                public short VirtualEdgeFlag { get; set; }
11,324✔
166
        }
167
}
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