Home
  • Products
  • Solutions
  • Support
  • Company

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  • Products
  • Solutions
  • Support
  • Company
Community PCB Design & IC Packaging (Allegro X) Allegro X Scripting - TCL DRC from TCL

Stats

  • State Not Answered
  • Replies 7
  • Subscribers 13
  • Views 4333
  • Members are here 0
More Content

DRC from TCL

ggeorgg
ggeorgg over 1 year ago

Dear community, 

is it possible to directly run a design rule check via TCL?

I have found the procedure "OrHandlerDRCConfig::capRunDRCConfigData", but it does not create the drc file when calling 

for example like this:

set pStrClientId "hostedClientId"
set pStrDRCConfigDataJson [::OrEntryDRCConfig::capGetDefaultDRCConfigData $pStrClientId]
OrHandlerDRCConfig::capRunDRCConfigData $pStrDRCConfigDataJson
The return value is just "3". Possible that the "pStrDRCConfigDataJson" variable is just wrong. Did someone already do this? It shall be part of a fully non-interactive script to help developers speed up when they think the design is ready to be "compiled". Currently I just open the DRC Widget with "Menu 'PCB::Design Rules Check"  ', but using this procedure, the script become interactive.
Thanks
BR
Georg
  • Sign in to reply
  • Cancel
  • TechiEE12
    0 TechiEE12 over 1 year ago

    Go to Options >Extended Preferences > Command Shell > Enable Journaling

    After this is done, any task done in Capture will result in the corresponding TCL command to be printed in the Capture TCL window.

    You can save these commands and rerun these any number of times. For example, to run a DRC the command is:

    ​Menu "Tools::Design Rules Check" | DialogBox  "OK" "C:/Users/bforsse/AppData/Local/Temp/CAPTURELOG/Wed_Mar_08_10_52_08_2017/Design Rules Options_1.xml"

    Save the xml file that is created (for example, F:/temp/drc/ Design Rules Options_1.xml).

    Run the DRC command by typing it in the Capture Tcl window as follows:

    Menu "Tools::Design Rules Check" | DialogBox  "OK" <xml file path>

    Example:

    Menu "Tools::Design Rules Check" | DialogBox  "OK" “F:/temp/drc/ Design Rules Options_1.xml”).

    Hope this helps!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ggeorgg
    0 ggeorgg over 1 year ago in reply to TechiEE12

    Thanks for your message.

    Which version are you using? I am on 22.1 and I had the Journaling already enabled. There I can only see 

    Menu "Tools::Design Rules Check"

    There is no path given to this command. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP over 1 year ago

    HI Georg,

    Please try the below tcl command , which dump the drc rule in drc.log file and then use drc.log to run the drc.

    RECORD:

    1. Type following command in capture command console:

    orPrmAutomation::setMode 1
    orPrmAutomation::setPath {D:/temp/drc.log}

    2. Launch DesignRuleCheck UI , select the DRC rules you want to configure and press Run. This will create a file at the above path.

    REPLAY:

    3.Type following command in capture command console:


    orPrmAutomation::setMode 2
    orPrmAutomation::setPath {D:/temp/drc.log}
    Menu "PCB::Design Rules Check" | DialogBox "OK" "C:%temp%/CAPTURELOG/<Folder_name_with_day_date>/Undo Warning!!_1.xml"

    Hope this helps!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ggeorgg
    0 ggeorgg over 1 year ago in reply to CadAP

    Hi CadAP, 

    I am still having problems executing the DRC check automatically. 

    2. 

    I tried your suggested way, but in the command window following gets printed after I ran the DRC manually:

    Error : invalid command name "OnScriptExecComplete"

    The drc.log file is still generated.

    3. 

    I did not "pipe" the DialogBox stuff, because it does not get displayed in my command window, when I execute the DRC manually even though the logging is enabled. has this maybe changed in OrCAD 22.1 and you are using 17.4? 

    Using just the command 'Menu "PCB::Design Rules Check" ' starts the DRC then automatically, but I get following printed on the command window.

         Menu "PCB::Design Rules Check"Error reading XML data.Error reading XML data.

    When I use 'Menu "PCB::Design Rules Check" | DialogBox "OK" "C:/temp/Undo Warning!!_1.xml" ', then the DRC window just opens, but it does not start automatically and after running it manually then I get the same "Error reading XML data" again.

    Any other hints?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP over 1 year ago in reply to ggeorgg

    Hi George,

    Please remove the below dirtive form the capture.ini if present.

    IssueUndoWarning=FALSE

    After removing you can run the step 2.

    2. Launch DesignRuleCheck UI , select the DRC rules you want to configure and press Run. This will create a file at the above path.

    Then try rest fo the steps.

    Make sure that drc.log file and undo Warning!!_1.xml file location are correct.

    It runs on SPB22.1 also.

    • Cancel
    • Vote Up +1 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