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 4712
  • 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
Parents
  • 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
Reply
  • 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
Children
  • 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
  • ggeorgg
    0 ggeorgg over 1 year ago in reply to CadAP

    Hello CadAP, 

    I did what you suggested, but I am not able to get it to work. Isn't there another way using the already existing procedures which also get called, when executing the DRC from the gui? Something like this:

    # pStrDRCConfigDataJson created manually so that it results in the same string as when the function is called from the gui.
    set pStrClientId "hostedClientId"
    ::OrEntryDRCConfig::capRunDRCConfigData $pStrDRCConfigDataJson $pStrClientId
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • RD20241009394
    0 RD20241009394 8 months ago in reply to CadAP

    Any updates for 23.1? As the menu has changed and ​'Menu "Tools::Design Rules Check"' no longer outputs anything regarding DialogBox

    • 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