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