CAD-PyRx
Python for AutoCAD & Clones
CAD-PyRx is an ObjectARX module that exposes ObjectARX methods to Python, CAD-PyRx also exposes CAD's ActiveX API. Currently supported platforms are AutoCAD® 2022-2027, BricsCAD® V24-V26, GStarCAD® 2024-2026, and ZwCAD® 2024-2027
Features
- uses wxPython for the GUI, support for Palette and Dialogs
- degugpy to easily step through and debug your code
- Jig, Overrule, Point monitor and other advanced tools
- readDwgFile to open and manipulate side databases
- import other python modules such as pandas
Installation
- Install Python 3.14 as shown here
- Install from PyPI (here):
pip install cad-pyrx - Install from the trunk:
python -m pip install git+https://github.com/CEXT-Dan/PyRx.git - Uninstall:
python -m pip uninstall cad-pyrx
Use APPLOAD command or the startup suite to load PyRx in CAD application, example: Note: if you are using a VENV, this path may differ, it will be loacated where you installed it
_APPLOAD
%localappdata%\Programs\Python\Python312\Lib\site-packages\pyrx\RxLoaderZ26.0.zrx
or
RxLoader24.1.arx = 2022
RxLoader24.2.arx = 2023
RxLoader24.3.arx = 2024
RxLoader25.0.arx = 2025
RxLoader25.1.arx = 2026
RxLoader26.0.arx = 2027
RxLoaderV26.0.brx = BricsCAD v26
Sample
# use prefix PyRxCmd_ to define a command called doit1
def PyRxCmd_doit1():
try:
db = Db.curDb()
filter = [(Db.DxfCode.kDxfStart, "LINE")]
ps, ss = Ed.Editor.select(filter)
if ps != Ed.PromptStatus.eOk:
return
lines = [Db.Line(id) for id in ss.objectIds()]
for line in lines:
print(line.startPoint().distanceTo(line.endPoint()))
except Exception as err:
traceback.print_exception(err)
# or use decorator to define a command called doit2
@Ap.Command("doit2", Ap.CmdFlags.kMODAL)
def function_setlayer():
try:
db = Db.curDb()
ps, id, _ = Ed.Editor.entSel("\nSelect a line: ", Db.Line.desc())
if ps != Ed.PromptStatus.eOk:
return
# all DbObjects accept an ID in the constructor
# line is garbage collected and closed
line = Db.Line(id, Db.OpenMode.kForWrite)
line.setLayer("0")
except Exception as err:
traceback.print_exception(err)
Metadata
Release files for cad-pyrx 3.1.16.5861
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cad_pyrx-3.1.16.5861-py3-none-any.whl | Python 3 | none | any | Details |
Release files / cad_pyrx-3.1.16.5861-py3-none-any.whl
| Download URL | cad_pyrx-3.1.16.5861-py3-none-any.whl |
|---|---|
| Size | 96.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06007e4d1c8cd864e5c441e52f36fd409ed59fa6ef25d1f56eb4fb8313f99056
|
|
BLAKE2b-256 checksum How to use checksums |
38c7d3489f1d3f3104a9c1d40bbf5875c0421a60d62694924b56eadfa52225b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for cad-pyrx 3.1.16.5861
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 1 file in this release has been uploaded with provenance metadata.
Attestation for cad_pyrx-3.1.16.5861-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.