Skip to content

Releases: Jsweb-Tech/AutoCAD

Version 0.1.11

03 Jan 07:20

Choose a tag to compare

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 VBA ThisDrawing.SummaryInfo.NumCustomInfo
  • cad.properties.add_custom_property() - Python equivalent for VBA SetCustomByKey()
  • Complete property management methods for seamless VBA migration

Properties Class Methods

General Properties (10 methods)

Manage basic document metadata:

  • get_title() / set_title() - Document title
  • get_subject() / set_subject() - Document subject
  • get_author() / set_author() - Document author
  • get_keywords() / set_keywords() - Document keywords
  • get_comments() / set_comments() - Document comments

Summary Properties (6 methods)

Manage document summary information:

  • get_manager() / set_manager() - Project manager
  • get_company() / set_company() - Company name
  • get_category() / set_category() - Document category

Statistics (5 read-only methods)

Access document statistics:

  • get_creation_date() - Date document was created
  • get_modified_date() - Date document was last modified
  • get_last_saved_by() - User who last saved the document
  • get_edit_time() - Total edit time in seconds
  • get_revision_number() - Document revision number

Custom Properties (7 methods)

Full custom property management:

  • get_num_custom_info() - Get count of custom properties
  • get_all_custom_properties() - Retrieve all custom properties as dictionary
  • add_custom_property(key, value) - Add new custom property
  • get_custom_property(key) - Get specific custom property value
  • remove_custom_property(key) - Remove a custom property
  • update_custom_property(key, value) - Update existing custom property
  • clear_all_custom_properties() - Remove all custom properties

Code Improvements

  • Error Handling - Full error handling with CADException for 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 AutoCAD class via cad.properties property

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

06 Aug 11:02

Choose a tag to compare

🛠 Release Notes – v0.1.10

✨ New Features

  • Added send_command() and send_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 APoint constructor
    Changed default x, y, z values from 0 to 0.0 to 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

24 Jul 04:52

Choose a tag to compare

add_table() function is fixed with manual table drawing algorithm

Full Changelog: v0.1.8...v0.1.9

Version Update

14 Jul 20:01

Choose a tag to compare

Documentation Added

Full Changelog: v0.1.7...v0.1.8

Fix : Added Missed Requirements & Version Change

14 Jul 19:27

Choose a tag to compare

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

05 Jul 06:31

Choose a tag to compare

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 / MaxPoint

with:

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

04 Jul 13:06

Choose a tag to compare

Common errors solved for the perfect work flow

Fix : Move object error fix

03 Jul 17:21

Choose a tag to compare

Move object error fix

AutoCADlib v0.1.3

03 May 07:34
a9cdb7e

Choose a tag to compare

Next Update

AutoCADlib v0.1.2

03 May 07:27

Choose a tag to compare

First release with AutoCAD automation features.