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/