• 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 PCB Editor
  3. How to use Skill to import updated IPC2581 XML file

Stats

  • Replies 10
  • Subscribers 159
  • Views 18190
  • Members are here 0
More Content

How to use Skill to import updated IPC2581 XML file

ottodude125
ottodude125 over 8 years ago

I am trying to create a skill function to automate updating the stackup in Allegro PCB Designer using an IPC-2581. The program will grab an ipc2581.xml file that was previously updated earlier in the skill program and import it into Allegro PCB Designer. 

I have tried two approaches but both fail to meet my needs. 

The first attempt was to make a system call to execute the ipc2581_in command.

board = axlCurrentDesign() ; test.brd
sprintf(command "ipc2581_in ipc2581.xml -x -o %s" board)
system(command)

The issue with this process is the stackup for test.brd in Allegro does not reflect the changes from the import once the import complets. The ipc2581_in function parses the xml file and the brd file. It then deletes the brd file and creates a new one (this is because they are both named the same thing). After the process is complete the skill function exits and I am returned to the PCB Designer window. Opening up the stackup window displays the same data that was there before the import. If I close the design (without saving) and open the board back up, the stackup will then reflect the changes from the import. For this process to work I would need to alter the above block of code to somehow refresh the board but I am unaware of a function that does this. NOTE: When you utilize the Cadence built in IPC2581 import function this is what appears to occur because the Cadence command window states 

PC2581 In completed successfully, use Viewlog to review the log file.
Opening existing design...

My second attempt was to use the axlShell function to run the ipc2581 command but this also does not work. I can run

axlShell("ipc2581 in") ; note there is no underscore

which will open up the Cadence IPC2581 In Gui but that defeats the purpose of automating the process since the designer now needs to still manually complete the process. I also tried running something similar to attempt 1 but without luck

board = axlCurrentDesign() ; test.brd
sprintf(command "ipc2581_in ipc2581.xml -x -o %s" board) ;
axlShell(command)

I tried the code above using "ipc2581 in" which just opened the Cadence gui and ignored all the text after the word in and I also tried using "ipc2581_in" which resulted in Allegro complaining there is no such command. 

Any help would be greatly appreciated!!

Thanks

Jonathan

  • Sign in to reply
  • Cancel
  • ottodude125
    ottodude125 over 8 years ago

    I got a fresh pair of eyes to look at my code and they came up with an alternate solution using a script. I am still open to other ideas if anyone has one particularly if it strictly uses skill to avoid any issues in the future if an Allegro update would break the scr syntax. 

    The alternate solution was to convert the jrl file to a scr file. I performed the actions within Allegro to import a stackup file. I then extracted just the IPC-2581 import commands from the jrl file and stored them in a test.jrl file. I used the Allegro Script generate function to convert this into a test_jrl.scr file which contained the following:

    generaledit
    ipc2581 in
    setwindow form.ipc2581_in
    FORM ipc2581_in browse
    fillin "test_ipc2581.xml"
    FORM ipc2581_in layer_feature NO
    FORM ipc2581_in layer_stackup YES
    FORM ipc2581_in execute
    setwindow pcb
    setwindow form.ipc2581_in
    FORM ipc2581_in cancel
    setwindow pcb
    generaledit

    From my skill program I replayed this script by using the command

    axlShell("replay test_jrl.scr")


    This executed as expected running the "ipc2581 in" command, selecting the xml file, setting the fields in the form, and then importing the file thus updating the stackup. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 8 years ago
    Have you tried using axlRunBatchDBProgram with the ?reloadDB parameter? (in place of system)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ottodude125
    ottodude125 over 8 years ago

    Dave.

    The test stackup I'm importing is extremely simple. I ran an ipc2581 export and changed the thickness on the top copper layer to 1 inch (a ridiculous number that will easily pop out). 

    I tried that command you mentioned but it does not completely work. I ran the skill commands: 

    axlSetVariable("wait_debug" nil)
    axlRunBatchDBProgram("ipc2581_in"
                                             "ipc2581_in 631-301-03_a_ipc2581v3_cross_section.xml -x -o 631-301-03_a.brd"
                                             ?startMsg "Starting ipc2581 in"
                                             ?reloadDB t)


    Which gave the cadence command line output: 

    Starting Starting ipc2581 in...
    cmd= ipc2581_in 631-301-03_a_ipc2581v3_cross_section.xml -x -o 631-301-03_a.brd
    ipc2581_in completed successfully, use Viewlog to review the log file.
    Opening existing design...
    ipc2581_in completed successfully, use Viewlog to review the log file.

    After the program completes I go to the xsection gui and it still lists the old values. Looking in Windows Explorer the brd file has been updated and has a new modified date. If I copy that brd file to another directory and open it up in a new instance of Cadence the xsection gui does show the correct thickness for the top layer. So the brd file gets updated but the Allegro PCB Designer gui does not get updated. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 8 years ago
    Brute force:

    designName = axlCurrentDesign()
    axlRunBatchDBProgram("ipc2581_in" sprintf(nil, "ipc2581_in %s.xml -x -o %s.brd", designName, designName) ?startMsg "Starting ipc2581 in" ?noLogview t)
    axlOpenDesign(?design designName, ?mode "wf")
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ottodude125
    ottodude125 over 8 years ago

    Dave that appears to work. It has a small byproduct of closing the axlForm that I have open which contains the button to start the import process but I can work with that. I scoured the Skill reference PDF and I overlooked the axlRunBatchDBProgram function and it doesn't contain the axlOpenDesign function. Thank you very much!! You are a huge help! 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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