Skip to main content

A library that can run scripts in altium designer

Project description

PyAltiumRun

PyPI version PyPI version PyPI version

A Python interface that can run Delphiscript in Altium Designer.

New features can be requested in the Github Issues.

Update

Fix bug log_str

Add

Add Parameter Pas File

Installation requirements

Altium designer must be installed before running this library.

Quick start

pip install PyAltiumRunTop
from PyAltiumRunTop.AltiumRun import AltiumRun

run = AltiumRun(use_internal_logger=True)                       #Create runner object
run.clear_log_file()                                            #Clear the logs of the previous run
run.set_project_to_open(r"Altium_project/Arduino_uno.PrjPcb")   #Define an Altium project to open
run.add_script(r"Altium_scripts/generate_docs.pas")             #Add a script to the runner
run.set_function("gen_docs", "Arduino_uno")                     #Set the function to run
run.run()                                                       #Run

Delphi addons

These are the delphi script addons created.

Logger

For this module to work the "use_internal_logger" parameter of the runner constructor should be True.

This module creates a log file in the data folder under the scripting project. It logs everything in the following format:

[DAY/MONTH/YEAR HOUR:MINUTE:SECOND:MILISECOND]: LOGGED_STRING

Resulting in a log that looks like this:

[09/01/22 10:53:30.573]: Starting script
[09/01/22 10:53:30.576]: Opening project: Altium_project/Arduino_uno.PrjPcb
[09/01/22 10:53:30.657]: Arduino_uno

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyAltiumRunTop-0.2.4.9.tar.gz (16.4 kB view details)

Uploaded Source

File details

Details for the file PyAltiumRunTop-0.2.4.9.tar.gz.

File metadata

  • Download URL: PyAltiumRunTop-0.2.4.9.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.4

File hashes

Hashes for PyAltiumRunTop-0.2.4.9.tar.gz
Algorithm Hash digest
SHA256 8416a53d81807bf5b70d106eeec8a2ba93e024ba15b9ff41acce917eeb0919e7
MD5 bccc3bdc70fc460e001c5ae7f100423b
BLAKE2b-256 996e5016807b2c4aedf922f5615375ffc8fb3755e4948b1963c078f7c5ad8fc8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page