Skip to content

fix(dwg): Add AC1032 version support and improve shell scripts - #34

Merged
marevol merged 1 commit into
masterfrom
fix/ac1032-parsing-and-script-improvements
Feb 15, 2026
Merged

marevol merged 1 commit into
masterfrom
fix/ac1032-parsing-and-script-improvements

Conversation

@marevol

@marevol marevol commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix DWG parsing for AutoCAD 2018 (AC1032) files by adding missing version checks
  • Improve shell script robustness with proper stderr handling and flexible binary lookup paths
  • Add new test targets for dimensions, annotations, and attributes

Changes Made

  • DWG Parser (AC1032 support): Added || version >= DRW::AC1032 condition to header (drw_header.cpp) and class reader (dwgreader18.cpp) so the high-size 32-bit field is correctly read for AC1032 files regardless of maintenance version
  • Shell scripts (dwg2txt, dxf2txt): Redirected all error/status messages to stderr (>&2) so stdout contains only command output; removed emoji characters for portability
  • Binary lookup (dwg2txt): Check installed location ($SCRIPT_DIR/dwg2text) before falling back to development path (../dwg2text/.libs/dwg2text); added installed lib path to LD_LIBRARY_PATH
  • Test targets (Makefile.in): Added test_dimensions, test_annotations, and test_attributes build and run targets

Testing

  • Existing test suite continues to pass
  • New test targets added to autotools build system

Breaking Changes

  • None. All changes are backward-compatible.

Additional Notes

  • The AC1032 fix addresses files where maintenance version may be <= 3 but the format still uses the extended header size field
  • Script changes ensure compatibility with automated pipelines that parse stdout

- Add AC1032 (AutoCAD 2018) version check to header and class parsing
  to correctly handle high-size 32-bit field regardless of maintenance
  version
- Redirect error messages to stderr in dwg2txt and dxf2txt scripts
- Improve dwg2txt binary lookup to check installed path before dev path
- Add installed lib path to LD_LIBRARY_PATH in dwg2txt
- Remove emoji characters from script output messages
- Add test_dimensions, test_annotations, and test_attributes test targets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@marevol
marevol merged commit bf80b74 into master Feb 15, 2026
4 checks passed
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.

1 participant