Releases: Jsweb-Tech/AutoCAD
Version 0.1.11
Release Notes
Version 0.1.11
Closes: The issue #5
Thank you @JMolina1982 for addressing this feature
New Features
Drawing Properties Management
Complete Python wrapper for AutoCAD drawing metadata with 30+ methods for managing drawing properties.
- Full CRUD operations for custom properties
- Support for general, summary, and custom property management
- Seamless integration with AutoCAD COM interface
VBA to Python Equivalents
Simplify your migration from VBA to Python with direct equivalents:
cad.properties.get_num_custom_info()- Python equivalent for VBAThisDrawing.SummaryInfo.NumCustomInfocad.properties.add_custom_property()- Python equivalent for VBASetCustomByKey()- Complete property management methods for seamless VBA migration
Properties Class Methods
General Properties (10 methods)
Manage basic document metadata:
get_title()/set_title()- Document titleget_subject()/set_subject()- Document subjectget_author()/set_author()- Document authorget_keywords()/set_keywords()- Document keywordsget_comments()/set_comments()- Document comments
Summary Properties (6 methods)
Manage document summary information:
get_manager()/set_manager()- Project managerget_company()/set_company()- Company nameget_category()/set_category()- Document category
Statistics (5 read-only methods)
Access document statistics:
get_creation_date()- Date document was createdget_modified_date()- Date document was last modifiedget_last_saved_by()- User who last saved the documentget_edit_time()- Total edit time in secondsget_revision_number()- Document revision number
Custom Properties (7 methods)
Full custom property management:
get_num_custom_info()- Get count of custom propertiesget_all_custom_properties()- Retrieve all custom properties as dictionaryadd_custom_property(key, value)- Add new custom propertyget_custom_property(key)- Get specific custom property valueremove_custom_property(key)- Remove a custom propertyupdate_custom_property(key, value)- Update existing custom propertyclear_all_custom_properties()- Remove all custom properties
Code Improvements
- Error Handling - Full error handling with
CADExceptionfor all property operations - Documentation - Comprehensive docstrings for all methods
- Type Hints - Full type hints for better IDE support and code intelligence
- Exception Messages - Try-except blocks with meaningful error messages
- Integration - Seamless integration with main
AutoCADclass viacad.propertiesproperty
Testing
- 5 comprehensive test functions covering all property operations
- Test coverage for general properties, summary properties, statistics, and custom properties
- Complete workflow testing for property CRUD operations
Usage Example
from AutoCAD import AutoCAD
cad = AutoCAD()
# Access general properties
cad.properties.set_title("My Drawing")
cad.properties.set_author("John Doe")
# Work with custom properties
cad.properties.add_custom_property("ProjectCode", "PROJ-001")
cad.properties.add_custom_property("DrawingType", "Structural")
# Get custom properties
num_custom = cad.properties.get_num_custom_info()
all_props = cad.properties.get_all_custom_properties()
# View document statistics
created = cad.properties.get_creation_date()
modified = cad.properties.get_modified_date()
revisions = cad.properties.get_revision_number()Breaking Changes
None. This release is fully backward compatible with previous versions.
Requirements
- Python 3.8 or later
- AutoCAD 2010 or later
- Windows OS (for COM support)
- pywin32
Contributors
License
MIT License - See LICENSE for details
For detailed API documentation, visit: https://jsweb-tech.github.io/AutoCAD/
Fix: Use float defaults (0.0) in APoint to ensure correct type inference & Feature : added send_command() and send_commands() functions
🛠 Release Notes – v0.1.10
✨ New Features
-
Added
send_command()andsend_commands()methods
These methods allow you to programmatically send command strings to the AutoCAD command line:send_command(command_string)— sends a single command (asynchronously).send_commands(commands)— sends a sequence of command strings in order.
⚠️ Note: These operations are asynchronous; commands requiring user interaction or long processing may need delays or alternative handling.
🐛 Bug Fixes
- Fixed default value types in
APointconstructor
Changed defaultx,y,zvalues from0to0.0to ensure proper float type inference. This resolves unintended behavior where arguments were inferred as integers.
Thanks to @Thomas737 for spotting this!
Full Changelog: v0.1.9...v0.1.10
Bug fix: Add Table
add_table() function is fixed with manual table drawing algorithm
Full Changelog: v0.1.8...v0.1.9
Version Update
Documentation Added
Full Changelog: v0.1.7...v0.1.8
Fix : Added Missed Requirements & Version Change
Release Notes
- Added missed requirements to setup
- Updated version number to reflect changes
Full Changelog: v0.1.6...v0.1.7
Fix : GeometricExtents not working so used GetBoundingBox to get min an max point of entity
Sure! Here's a professional and concise GitHub issue response you can post to indicate the fix:
✅ Resolved
The issue occurred because .GeometricExtents is unreliable for certain entity types (especially AcDbBlockReference) when accessed via COM in Python. It often raises <unknown>.GeometricExtents errors due to internal limitations in the AutoCAD COM API.
I've fixed this in the latest version of the library by replacing:
entity.GeometricExtents.MinPoint / MaxPointwith:
entity.GetBoundingBox()This method is much more stable and returns accurate extents even for block references, respecting rotation and scaling.
Please pull the latest version of the library — the get_block_extents() function now uses GetBoundingBox() internally.
Fix : Common Errors Solved
Common errors solved for the perfect work flow
Fix : Move object error fix
Move object error fix
AutoCADlib v0.1.3
Next Update
AutoCADlib v0.1.2
First release with AutoCAD automation features.