Developing parametric Python components for AutoCAD Plant 3D has a major productivity bottleneck: because of Python module caching inside the AutoCAD process, modifying a script normally forces you to restart AutoCAD (often 30–60 seconds per iteration).

I built and open-sourced P3dPyPad (GPL-3.0) to fix this workflow and add offline simulation + batch testing.

What's Included

  1. Zero-Restart F5 Hot Reload (PYPAD): Uses an in-memory proxy (DEV_PROXY.py) and PnP3dACPAdapter.arx so pressing F5 regenerates and replaces 3D solids directly in the active Plant 3D viewport without restarting AutoCAD.
  2. Automated Batch Testing (PYBATCH / PYBATCH_RUN): Recursively validates directories of .py scripts, captures isometric previews, and surfaces Python stack traces for CI/regression checks.
  3. Standalone PyOCC Offline Workbench (plant3d_occ/): Aligns Plant 3D geometric primitives on Python 3 + OpenCASCADE (pythonocc-core 7.7+) and PySide6, supporting offline modeling, 45-degree architectural-tick dimensioning, and .acat/.pcat/.peqx/SQLite publishing without launching AutoCAD.
  4. Zero-Dependency WebAssembly 3D Studio (web/): Runs OpenCASCADE WASM (occt.js) and Three.js in the browser with orthographic CAD controls and isometric PNG export.
  5. 494 Parametric Component Scripts (pyscripts/): Covers fittings, flanges, valves, instruments, equipment, and pipe supports (CD/ZD 2010 and HG/T 21629) with co-located .csv spec tables.
  6. Dual-Target .NET Plugin: Multi-targets net472 (AutoCAD Plant 3D 2019–2024) and net8.0-windows (2025–2026) in a single P3dPyPad.bundle package.

Current Limitations

  • The in-process CAD plugin targets Windows AutoCAD Plant 3D, though the PyOCC workbench and browser WASM studio run standalone.
  • Licensed under GPL-3.0.

Try out the browser WASM studio or check out the component scripts on GitHub!