1 2 First Previous 16 Replies Latest reply on Jul 2, 2017 12:15 AM by roby

    Automation of Report writer IPC Netlist.

    wes_cessnun

      I have been trying to figure out have to automate an output file from PCB. I have got the the point of the IPC output but want to change the name and browse for the correct location.  I was trying to use o sendkey commands.

       

      I doubt this is the best way to do this but I am new at this and haven't worked with vbscripting that much. Here is the code I am usng. And for some reason the script I am calling this from doen't like the wscript.sleep command so i left that commented out. I have the rest working by looking at scripts from the AATK stuff but unsure how to get the IPC D 356 Generation popmenu (This menu can not be minimized, don't know if that means anything.) to do what I want. As you can see i don't know much about scripting but am trying to learn.

       

       

          Option Explicit
           
      Dim oWShell

       

              Set oWShell = createobject("WScript.shell")  


             oWShell.AppActivate "vbreport.exe"
          

             ' WScript.Sleep(100)
       

            oWShell.SendKeys "%T"

            ' WScript.Sleep(100)


            oWShell.SendKeys "L"

            ' WScript.Sleep(100)


            oWShell.SendKeys "I"

            ' WScript.Sleep(100)


            oWShell.SendKeys "%R"
            ' WScript.Sleep(100)
      ' This part I am not sure how to do as  tab doesn't seem to tab it up to the next location and

      ' then am not sure If I just over write the ipc356.ipc text and browse for the specified location.

      'For some reason it skips over this part and just closes the vbreport.exe file.

            oWShell.AppActivate "ipc356.exe"
            ' WScript.Sleep(100)

       

            oWShell.SendKeys "{TAB}"
            ' WScript.Sleep(100)

       

            oWShell.SendKeys "%O"
            ' WScript.Sleep(100)

       

            oWShell.AppActivate "vbreport.exe"
            ' WScript.Sleep(100)

       

            oWShell.SendKeys "%F"
            ' WScript.Sleep(100)

       

            oWShell.SendKeys "x"

       

       

      Thanks

      Wes

       

       
       

        • 1. Re: Automation of Report writer IPC Netlist.
          wes_cessnun

          I have figured out how to do this. I have to add to popup menus to wait for Report writer to appear and another to wait for the file to be generated but it works ok. I also Rename the file to what I want.

                 

          Use the ProcessCommand and FindDialog to find Report Writer

          then Findcheckbox to find Physical board data

          and then FindButton to find the ok button.

          Sub  Report()

          Dim oWShell
          Set oWShell = CreateObject("WScript.shell")

           

           

                   MsgBox "WAIT FOR REPORT WRITER TO APPEAR BEFORE PRESSING OK!"

                  oWShell.AppActivate "vbreport.exe"

                  scripting.sleep 500

                  oWShell.SendKeys "%T"

                  oWShell.SendKeys "L"

                  oWShell.SendKeys "I"

                  oWShell.SendKeys "%R"
                  scripting.sleep 500
                  oWShell.SendKeys "{Tab}"

                  scripting.sleep 500
                  oWShell.SendKeys "{DEL 10}"
                  scripting.sleep 1000
                  oWShell.SendKeys "TEST_REVA_IPC.ipc"
                  scripting.sleep 1000
                  oWShell.SendKeys "%O"
                  scripting.sleep 1000

                  MsgBox "WAIT FOR NETLIST POPUP MENU TO EXIT, THEN PRESS OK."

                  scripting.Sleep(500)
                  oWShell.SendKeys "%{TAB}"
                  scripting.Sleep(500)
                  oWShell.AppActivate "vbreport.exe"

                  scripting.sleep 1000
                  oWShell.SendKeys "%F"
                  scripting.sleep 1000
                  oWShell.SendKeys "X"

           

          End Sub

          • 2. Re: Automation of Report writer IPC Netlist.
            patrick.cashman

            You can also run the ipc356b.exe in a command line mode by sending it a command like:

             

            C:\MentorGraphics\2005EXP\SDD_HOME\common\win32\_bin\ipc356b.exe -pcb <Design Path>\<Design Name>.pcb

             

            This could be done with a batch file or with vb commands. It will generate the ipc file in the output directory of the design.

             

            The use of sendkeys has always seemed very complicated and unpredictable to me.  There is a lot of guessing for how long things will take, then if your machine is slow the code won't work.

             

            I've been doing the above with a batch file I edit for each design, and am planning to write something up that will do it in a more automated fashion.  I'll post it in here when I do.

             

            -Patrick

            • 3. Re: Automation of Report writer IPC Netlist.
              BoarderGrl

              Hi Patrick,

               

              I like the idea of using the ipc356.exe file. What about the database that ipc uses. I tried to run dbauto.exe with an argument of vbpcb=<design file>. But, dbauto doesn't seem to do anything. When I run it without the argument, it asks for the design name and then runs the database. So basically, I am looking for the arguments for both dbauto.exe or dbcreate.exe and ipc356.exe. I did try the sendkeys method. It works part of the time, which is not good enough.

               

              Thanks,

              Andrea

              • 4. Re: Automation of Report writer IPC Netlist.
                lary.e

                we run in a Perl program:

                 

                $ENV{SDD_COMMON_BIN}\dbauto.exe vbpcb=driveletter:\full\path\PCB\name.pcb

                 

                $ENV{SDD_HOME}\wg\win32\bin\ipc356.exe driveletter:\full\path\PCB\vbreport\output\VBPCBP.mdc

                 

                HTH

                • 5. Re: Automation of Report writer IPC Netlist.
                  Joel_B

                  Hello,

                   

                  I can't get ipc356.exe to read the mdc file using the following format. A form opens asking for the location of the mdc database. Is there supposed to be an option switch (such as -database)? What version of Mentor are you using the script below? We are at EE7.9.2 Update 7.

                   

                  $ENV{SDD_HOME}\wg\win32\bin\ipc356.exe driveletter:\full\path\PCB\vbreport\output\VBPCBP.mdc

                   

                  Thanks!

                   

                  JB

                  • 6. Re: Automation of Report writer IPC Netlist.
                    lary.e

                    $ENV{SDD_HOME} is the way to bring SDD_HOME path from the environment variable when writing a Perl program.

                    maybe replace it with something like "c:\mentorgraphics\7.9.2EE\SDD_HOME"  or %SDD_HOME%  depending on your installation and application.

                     

                    HTH

                    • 7. Re: Automation of Report writer IPC Netlist.
                      Joel_B

                      It is finding the executable ok but not the database file. The following works with the "-DB=" option although it brings up the IPC form. Is there a way to run this without the form appearing?

                       

                      C:\MentorGraphics\7.9.2EE\SDD_HOME\wg\win32\bin\ipc356.exe -DB="designPath\PCB\vbreport\output\VBPCBP.mdc"

                       

                      JB

                      • 8. Re: Automation of Report writer IPC Netlist.
                        kendall_hiles

                        How about just creating the report directly inside Expedition.

                         

                        -kendall

                        • 9. Re: Automation of Report writer IPC Netlist.
                          lary.e

                          JB, I don't know how to skip the selection of the mdc.

                           

                          Kendall, well if one doesn't want to open the application, just run an automation program to produce all files.

                          • 10. Re: Automation of Report writer IPC Netlist.
                            Joel_B

                            To summarize there are several solutions. Solution 1 runs existing Mentor executables to create the IPC356 netlist and requires the user to OK the IPC356 form. Solution 2 is code, provided by Kendall in a previous reply, to extract data from an Expedition design and write the IPC356 netlist format thus getting around the problem of having the user OK a form. Fablink XE or XE PRo licenses are not needed for either of these solutions.

                             

                            Solution 1

                            # the following creates the Report Writer database, VBPCBP.mdc, in designPath\PCB\vbreport\output

                            #designPath is the full path to the design folder (c:\myproject\mydesign)

                            C:\MentorGraphics\7.9.2EE\SDD_HOME\wg\win32\bin\dbauto.exe vbpcb=designPath\pcb\design.pcb

                            #the fllowing uses the Report Writer database to create the IPC356 netlist also in designPath\PCB\vbreport\output

                            C:\MentorGraphics\7.9.2EE\SDD_HOME\wg\win32\bin\ipc356.exe -DB="designPath\PCB\vbreport\output\VBPCBP.mdc"

                             

                            Solution 2

                            see a previous reply by Kendall for a zip file of VBS code to write the IPC356 format.

                             

                             

                            Thanks HTH and Kendall for yout input!

                             

                            JB

                            • 11. Re: Automation of Report writer IPC Netlist.
                              bbpcbdesign

                              Hi Kendall,

                              when you release a new version of AATK ?

                               

                              Best regards

                              Bolis Bortolo

                              • 12. Re: Automation of Report writer IPC Netlist.
                                thad.schultz

                                Kendall,

                                 

                                Should I let it bother me that your ipc356.vbs generates an IPC-356 that looks quite different from the one that Expedition PCB generates from the File->Export->IPC-D-356B menu?  I don't know enough about the file format and 3rd party usage of the file to know one way or the other.

                                 

                                Also is it possible to use a replay file to automate this menu similar to how AATK automates the Mitron Gencad output?  How does the replay file work or where is it documented?

                                 

                                Thanks

                                 

                                Thad Schultz

                                • 13. Re: Automation of Report writer IPC Netlist.
                                  kendall_hiles

                                  The IPC-356 in AATK writes is 356-A, Expedition writes 356-B, report writer writes the old format IPC (no revision, this one is useless, it does not support micro vias or round pads).

                                   

                                  I looked at the Engines type library and the IPC is not exposed.

                                  The replay commands are not document and in fact the reply command is not supported in automation.  You could not use Reply for this menu reliably because it has too many options.

                                   

                                  See if you vendor can take the version in AATK and you can just use my code.  If not your stuck outputting it from Expedition by hand.

                                   

                                  --kendall

                                  1 of 1 people found this helpful
                                  • 14. Re: Automation of Report writer IPC Netlist.
                                    john.fonseca@ni.com

                                    Does this not exists for win64?  I was looking for an automated way to run ipc, however I don't see the .exe anywhere in the 64bit version I'm using.

                                    1 2 First Previous