• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X Scripting - Skill
  3. Python based scripting on Cadence SPB

Stats

  • State Suggested Answer
  • Replies 14
  • Answers 1
  • Subscribers 19
  • Views 4567
  • Members are here 0
More Content

Python based scripting on Cadence SPB

particlereddy
particlereddy 6 months ago

Hi,

newbie question,

This question might have been asked many times.

[1] I could not find any python script based possibility for DRC check automation scripting using python. Did my homework before asking.

[2] all I see is SKILL based scripting. 

[q1] Please point me to any UserGuide or programming manual in python [if any]?

[q2] Is it possible via C++?

Thanks

  • Cancel
  • Sign in to reply
  • mahimag
    0 mahimag 6 months ago

    Hello particlereddy , Once can call the Pythonb program from Allegro using Allegro SKILL.

    For example, if we have test.py code, we can call it using SKILL sh in Allegro PCB Editor and it run in a command shell.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 6 months ago in reply to particlereddy

    Hi!


    I apologize for the late response

    Examples using a report from Allegro to export DRC to a file (.csv).

    Don't launcher Allegro.
    100% python script.

    code Python

    import subprocess

    input_data = "/path/to/your/file.brd"
    output_csv = "/temp/folder/report_drc.csv" // create before run
    cmd = ["report", "-v", "drc", input_data, output_csv]

    subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

    Regards,

    HoangKhoi

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 6 months ago in reply to particlereddy

    Hello,

    you can refer to this code. very fast and smooth

    string  input_data = "/path/to/your/file.brd";
    string file_csv = "/report_waive.csv";
    string cmd = "report -v waived_drc " + input_data + " " + file_csv;
    wxDisableAsserts();
    wxExecute(cmd.c_str(), wxEXEC_SYNC | wxEXEC_HIDE_CONSOLE | wxEXEC_NODISABLE);

    wxWidgets in c++

    HoangKhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • particlereddy
    0 particlereddy 6 months ago in reply to mahimag

    Hi mahimag , Thanks for reply. I am looking completely pythonic way of automation.

    [0] something like <drc_check.py> <------> <cadence python library APIs>

    if above not available, how about the below options

    [A] <drc_check.py> <----------> TCL script for DRC 

    [B] <drc_check.py> <----------> system cmd based <windows_run>.bat run <-----> SKILL script for DRC or RAVEL script for DRC.

    Please let me know if A and B are possible?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information