Skip to content

Refactor ACDS/ACIS schema handling and storage - #1174

Merged
DomCR merged 13 commits into
masterfrom
DxfAcdsDataSection
Sep 30, 2026
Merged

DomCR merged 13 commits into
masterfrom
DxfAcdsDataSection

Conversation

@DomCR

@DomCR DomCR commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Description

Introduce CadFileDataStorage with new Schema and SchemaProperty types for structured ACDS data.
Update DxfAcdsDataSectionReader and document builders to use the new model.

Introduce CadFileDataStorage with new Schema and SchemaProperty types for structured ACDS data. Update DxfAcdsDataSectionReader and document builders to use the new model. Mark legacy schema/property classes as obsolete. Refactor DwgPrototype1bReader for clarity and type safety. Improves maintainability and prepares for enhanced ACDS/ACIS support.
@DomCR DomCR added the enhancement New feature or request label Aug 2, 2026
Refactored ACadSharp data storage schema classes for better modularity:
- Moved Schema, SchemaProperty, and SchemaPropertyFlags to separate files and namespaces.
- Removed AcdsPropertyDescriptor.
- Added AcdsRecord class for embedded records.
- Updated DxfAcdsDataSectionReader to parse embedded records.
- Schema now holds a list of embedded AcdsRecord objects.
@ilCosmico

Copy link
Copy Markdown
Contributor

Hi @DomCR, I checked out this branch and ran the tests around the ACDS area on net9.0: 10 pass, and DxfAcdsDataSectionTests.ReadAcdsDataAttachesAcisPayloadToOwnerEntity fails with Assert.NotNull() Failure: Value is null, since readAcdsRecord throws NotImplementedException. Compared to master the DXF side loses the payload on files saved from 2013 onwards.

That path came in with #1139, so I know it well and I am glad to port it onto the new schema types if that helps.
If you would rather carry the refactor on your own way and at your own pace, that is fine too, just tell me and I will leave it with you.

Use fully qualified Prototype1b.DataStorage for the single storage property definition and remove the unimplemented IsValid() placeholder.
Renamed the ACDS storage model types to `Acds*` to avoid conflicts with `Prototype1b.DataStorage`, updated `CadDocument.DataStorage` and schema references, added `AcdsRecord`/`AcdsRecordColumn` parsing support, and consolidated the old schema/type definitions.
Introduce AcdsRecord parsing, expand AcdsRecordColumn to capture data type, name, and raw code/value pairs, and update DxfAcdsDataSectionReader to read record columns. Add a starting write log line in LocalSampleTests for DXF/DWG output visibility.
CadFileDataStorage now exposes separate Records and Schemes lists, and the DXF ACDS section reader adds parsed ACDSSCHEMA and ACDSRECORD entries directly to builder.DataStorage.
Store ACDS record columns by name, add record/debug helpers, attach ASM/DS binary data during document build, track DS payloads on templates, and update DXF/DWG readers and tests accordingly.
Mark `CadDocument.DataStorage` obsolete, simplify `CadFileDataStorage` to constants only, remove dead commented schema code from `CadDocumentBuilder`, and drop obsolete XML docs from `DwgReader.readClasses()`.
@DomCR DomCR added the minor Updates the minor version on merge. label Sep 30, 2026
@DomCR
DomCR merged commit e9ed964 into master Sep 30, 2026
5 checks passed
@DomCR
DomCR deleted the DxfAcdsDataSection branch September 30, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor Updates the minor version on merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants