The electrical, instrumentation, and controls group ran their cable schedules on an integrated Excel/VBA tool that had grown past the point of maintainability. As part of a Technical Development Council initiative, I was asked to replace it - a discipline entirely outside structural engineering. The result is a stable, modular Python platform built for long-term expansion rather than a like-for-like port.


My Role

Lead architect and sole developer. Delivered the first release and demoed it to the electrical team, who are currently trialling it.

What I Built

Automated NEC/CEC sizing pipeline

  • Minimum circuit ampacity calculation
  • Ambient and grouping derating factors
  • Terminal and breaker coordination
  • Dispatched per jurisdiction - changing the jurisdiction recomputes the entire project

Automated wire selection

  • Produces three candidate sizes from full-load amps and load type
  • FLA estimation from motor HP/kW, or rated FLC lookup against CEC Tables 44/45

Application architecture

  • Dual run modes: native desktop via pywebview, and browser-accessible web mode
  • Portable SQLite project files - a project is a single file that can be copied, archived, or emailed
  • Advisory file-locking for safe concurrent access on shared network drives
  • Inline grid editing for both power and instrument/control cable schedules
  • Bulk Excel export - one workbook per schedule, or a cover sheet with one tab per schedule
  • Structured so new features, jurisdictions, or schedule types can be added without touching existing logic

Traceability

  • Git-backed change log providing a full audit trail on every sizing decision, without the fragility that made the VBA version untrustworthy

Spreadsheet Limitations

The Excel/VBA tool worked until it didn’t. There was no change history, no way to test a sizing rule in isolation, and no safe path to add a jurisdiction without risking every existing project. Moving to a modular Python codebase with a real database and version control made the sizing logic auditable and the platform extensible - the two properties the spreadsheet could never have.

Domain Ramp-Up

Cable sizing methodology, derating factors, and jurisdiction-specific lookup tables are electrical engineering, not structural. Building this meant learning the NEC and CEC sizing rules well enough to encode them correctly and defend the results to the engineers who would rely on them.

Technical Stack

Python 3.12, uv, pywebview, SQLite, comprehensive documentation suite covering architecture, database models, the cable sizing pipeline, Python API reference, configuration, and technical decisions. MPL-2.0 licensed.