Skip to content

TableEntity dwg support#1040

Open
DomCR wants to merge 17 commits intomasterfrom
issue/1000_tableentity-DwgWriter
Open

TableEntity dwg support#1040
DomCR wants to merge 17 commits intomasterfrom
issue/1000_tableentity-DwgWriter

Conversation

@DomCR
Copy link
Copy Markdown
Owner

@DomCR DomCR commented Apr 18, 2026

Description

Split writeEntity into entity-specific methods for clarity and maintainability. Move child entity handling to a dedicated method. Add support for TableEntity serialization and remove its "not implemented" notification. No functional changes to serialization logic; code is now modular and easier to extend.

Split writeEntity into entity-specific methods for clarity and maintainability. Move child entity handling to a dedicated method. Add support for TableEntity serialization and remove its "not implemented" notification. No functional changes to serialization logic; code is now modular and easier to extend.
@DomCR DomCR linked an issue Apr 18, 2026 that may be closed by this pull request
DomCR added 16 commits April 18, 2026 17:27
Major refactor of DXF class management and object writing:
- DxfClassCollection is now document-bound and instance-based.
- CadDocument owns its Classes collection; instance counts are accurate.
- DwgReader and DwgClassesReader now populate the document's Classes.
- DwgObjectWriter refactored for modular, robust object/table writing.
- Improved XRecord, dictionary, and entity serialization.
- Ellipse and Hatch boundary path use RadiusRatio for consistency.
- Added DwgReader for comprehensive DWG file reading.
- Numerous bug fixes, documentation, and code cleanups.
Refactored TableEntity and related classes for improved encapsulation, initialization, and DWG compatibility. Moved internal enums to separate files, renamed and simplified BreakData to TableBreakData, and updated Column/Row classes. Enhanced DwgObjectReader/Writer to support new structure, added color handling in writers, and fixed class naming issues. Includes minor method and documentation improvements.
Refactored code to always write 0 for the linked data flag and skip writing linked data details by disabling the conditional block. Preserved the original logic inside an inactive code block for potential future use.
Refactored DwgObjectReader to modularize table entity parsing into focused methods for cells, styles, borders, and content. Improved handling of version-specific logic, custom data, and style overrides. Updated writer and templates for correct enum usage and object construction. Enhances maintainability and DWG spec compliance.
Refactored TableEntity template classes in ACadSharp.IO.Templates for better modularity and maintainability. Split internal classes into partials, introduced ITableComponent for unified handling, and updated Column/Row implementations. Improved property naming, template Build methods, and updated readers to use new structures. Cleaned up obsolete code.
Moved ITableComponent to its own file with full XML docs and required properties. Updated Column and Row to implement the interface with proper initialization and documentation. Enhanced DwgObjectReader and CadTableEntityTemplate to manage cell style templates more explicitly. Included minor cleanups and improved error handling.
Refactored TableEntity by moving CellBorder, CellStyle, and CellStyleType out of nested classes and clarifying their property definitions. Added ApplyBorder to CellBorder for serialization control. Updated DwgObjectWriter and DwgObjectReader to handle new border and cell style serialization logic, including margin overrides and selective border writing. Improved code structure and documentation for maintainability.
Refactor TableStyle to support explicit cell style properties and collections. Improve DWG read/write logic for table and cell styles, including style IDs and references. Update builder and template classes for correct style assignment. Add support for style overrides, name lookups, and break data flags. Improve documentation and code clarity.
Prevent possible NullReferenceException by ensuring CellStyle.Name is not null before calling Equals in the tryGetCellStyle method.
Expose cell style name constants and add static default properties in TableEntity.CellStyle. Update TableStyle to use these defaults for DataCellStyle, HeaderCellStyle, and TitleCellStyle. Remove fallback creation of unnamed cell styles in CadTableStyleTemplate. Improve code clarity in DwgObjectWriter.
Move cell style, border, and related enums from Entities to TableStyle in Objects. Update all references and templates to use new structure for improved organization and clarity. No functional changes.
Replaced NotImplementedException with HandleReference calls for Field and Block table cell content types. Implemented writeCustomTableData to serialize item name and value. Updated CSUtilities submodule to a dirty state.
Added support for TableEntity in DwgObjectWriter for versions before R2010, preventing it from being marked as unimplemented. Documented table value bit flags for R2007 and earlier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TableEntity - dwg writer

1 participant