12 Replies Latest reply on Nov 16, 2015 12:32 PM by austin.t.morgan

    Replacement script for PDB2HKP ASCII output

    Wim Creyghton

      Hi all,

       

      We are using a self made netlist conversion program which uses the "old" PDB2HKP ASCII output.

      We are now on EE7.9.5. and the software is not working anymore.

      Does anybody has a "new" script that can generate the same output in ASCII?

       

      I'm not into programming, so that's why I ask you guy's.

       

      Thanks.

      Wim.

        • 1. Re: Replacement script for PDB2HKP ASCII output
          al_layson

          HKP ASCII Input/Output is only available via an HKP decrypt/encrypt license. You will need to apply for that license. Please review the information at HKP FAQ 12-6-2010 (Updated)

          Regards,

          Al

          • 2. Re: Replacement script for PDB2HKP ASCII output
            Wim Creyghton

            Hi Al,

             

            Thanks for the information but I know about the document.

             

            We had the Dataconvert (HKP decrypt/encrypt) license for EE2007.5 but now we are on EE7.9.5.

            We have a netlist converter and used the PDB2HKP and then the Dataconvert module to create the decrypted PDB ASCII to use in our software.

            Because Mentor wants us to no longer use HKP we are looking for a script which can do the same.

            Create an ASCII output format from the PDB in the same syntax like before.

             

            Because I'm not into programming but designing I'm looking for a standard replacement script which can help me using our software again.

             

            Regards,

            Wim.

            • 3. Re: Replacement script for PDB2HKP ASCII output
              al_layson

              Wim,

              The intended replacement for HKP Data files is through the use of Automation to export/import data in a user specific format. You would need to have - or contract - a resource that can develop Automation Scripts for you. There is no "standard" replacement script for HKP Export/Import. Dataconvert (decrypt/encrypt) is still available in 7.9.5. I suggest you acquire new Dataconvert licenses and continue with your current process until you can acquire/develop the script required.

              Al

              • 4. Re: Replacement script for PDB2HKP ASCII output
                MikeD

                Hi Wim,

                Will you post some snippets of the ASCII netlist you're looking for? Head, Nets and Parts?

                I may have an idea.

                Mike

                • 5. Re: Replacement script for PDB2HKP ASCII output
                  Wim Creyghton

                  Hi Mike,

                   

                  Thanks for the help.

                  The output is a standard Mentor .kyn netlist. The input netlists are Calay/Calay90, Calay Prisma, Ulticap/Ultiboard, Viewlogic and Mentor format

                  We use the PDB2HKP ASCII output to convert pinnames to pinnumbers for diodes, transistors, elcaps etc.

                   

                  We now have a Dataconvert license for EE7.9.5. so the problem is solved for this moment.

                   

                  Wim.

                  • 6. Re: Replacement script for PDB2HKP ASCII output
                    Wim Creyghton

                    Hi All,

                     

                    It's now one year ago posting this question.

                    We are now on VX.1.1 but I still have the same problem.

                     

                    On EE7.9.5. we got a temporarily fullencrypt license, but for VX.1.1 we have to solve the problem with scripting.

                    Someone made a script for us, because I'm not into scripting, but this script uses the wglibman license.

                    The problem is we don't have a wglibman license because we use the librarymanager inside xPCB Layout and xDX Designer and not standalone.

                    Our scripting module is therefore the basic module.

                     

                    I was wondering if it is possible to extract the PDB data to ASCII (like the old PDB2KHP module) with Basic scripting without a standalone librarymanager license?

                     

                    Please let me know.

                     

                    Wim.

                    • 7. Re: Replacement script for PDB2HKP ASCII output
                      al_layson

                      Wim,

                      Please copy the following code to a .vbs file. Then Open PCB in xPCB Layout VX.1.1 and execute Setup > xDM Library Tools...When the tool has opened, open this script via File > Open Script Form and execute "Run". If this script does not run properly, then you will need a stand alone xDM Library Tools license in order to access automation for xDM Library Tools.

                       

                      Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")
                      Dim file
                      Dim sComVersion : sComVersion = Scripting.GetEnvVariable("EXP_PROG_ID_VER") : If sComVersion = "" Then sComVersion = "1"
                      'SlotPins
                      Set SlotPins=CreateObject("Scripting.Dictionary")

                      main()

                      Sub main
                      Dim libApp: Set libApp=Application
                      Dim LibDoc: Set LibDoc=libApp.ActiveLibrary
                      Dim LibFullName: LibFullName=LibDoc.FullName
                      Dim LibPath: LibPath=LibDoc.Path
                      'Create & open the output text file for writing
                      Dim sFilename
                      sFilename=LibPath & "LogFiles\CreateWBPads.txt"
                      Set file = fso.CreateTextFile(sFilename, True)

                      file.writeline(LibFullName)
                      file.writeblanklines(1)

                      'Get the PartEditor and its TypeLibrary
                      Dim partEdObj
                      Set partEdObj = LibDoc.PartEditor
                      If partEdObj Is Nothing Then
                        msgbox("ERROR: Unable to Open the Cell Editor")
                        Exit sub
                      End If
                      Scripting.AddTypeLibrary("MGCPCBLibraries.PartsEditorDlg." + sComVersion)

                      ' Get the parts database for the design
                      Dim PDB
                      Set PDB = partEdObj.ActiveDatabase

                      'Do for each partition 
                      Dim partition,part
                      For Each partition In PDB.Partitions
                        file.writeline("Partition : " + partition.name + "........................................................")
                        file.writeblanklines(1)
                        For Each part In partition.parts
                         RptPins(part) 
                        Next
                      Next

                      partEdObj.Quit()
                      Set partEdObj=Nothing

                      'Close and open our logfile
                      file.Close
                          Dim WshShell
                          Set WshShell = CreateObject("WScript.Shell")
                      WshShell.Run sFilename

                      End Sub

                       

                      Sub RptPins(part)
                      Dim gate,slotnum,slot,pin,pd,pintype,cell,nc,nr,sup,prop,sym,line
                      file.writeline("Part Number : " & part.Number)
                      file.writeline("     Name : " & part.Name)
                      file.writeline("     Label : " & part.Label)
                      file.writeline("     Description : " & part.Description)
                      file.writeline("     Part Incomplete : " & part.Incomplete)
                      file.writeline("     Part Type : " & part.TypeString)
                      file.writeline("     RefDes Prefix : " & part.RefDesPrefix)
                      file.writeline("     Verified : " & part.Verified)
                      file.writeline("     Number of Pins : " & part.pinmapping.PinCount)
                      For Each prop In part.properties
                        file.writeline("     " & prop.Name & " = " & prop.Value)
                      Next
                      file.writeline("     Symbol References")
                      For Each sym In part.SymbolReferences
                        file.writeline("         Symbol : " & sym.Name)
                      Next
                      file.writeline("     Cell References")
                      For Each cell In part.CellReferences
                        file.writeline("         Cell : " & cell.Name)
                      Next
                      file.writeblanklines(1)
                      End Sub

                      1 of 1 people found this helpful
                      • 8. Re: Replacement script for PDB2HKP ASCII output
                        Wim Creyghton

                        Al,

                         

                        Thanks, the script is working inside xPCB.

                        The only thing now is to fine-tune the output.

                        Our program reads the "old" HKP format and only in that syntax.

                        For example:

                        Your output syntax:

                        Part Number : APT1608CGCK

                             Name : LED GREEN-SMD

                             Label : LED GREEN-SMD-0603

                             Description :

                             Part Incomplete : False

                             Part Type : Diode

                             RefDes Prefix : LED

                             Verified : True

                             Number of Pins : 2

                             Manufac. = KINGBRIGHT

                             PDF = P

                             Ordercode = 754-1116-1-ND

                             Supplier = DIGI-KEY

                             Colour = GREEN

                             Symbol References

                                 Symbol : Diode_LED:LED

                             Cell References

                                 Cell : LEDC1608X75N-R

                         

                        Old HKP syntax:

                        .Number "APT1608CGCK"

                          ..Name "LED GREEN-SMD"

                          ..Label "LED GREEN-SMD-0603"

                          ..Desc ""

                          ..RefPrefix "LED"

                          ..TopCell "LEDC1608X75N-R"

                          ..Modified 1383126403 ! 30-10-2013 10:46

                          ..Prop "Type", "Diode", "Text"

                          ..Prop "Manufac.", "KINGBRIGHT", "Text"

                          ..Prop "PDF", "P", "Text"

                          ..Prop "Ordercode", "754-1116-1-ND", "Text"

                          ..Prop "Supplier", "DIGI-KEY", "Text"

                          ..Prop "Colour", "GREEN", "Text"

                          ..SwapGroup "gate"

                          ...SwapID "P0"

                          ...SwapID "P1"

                          ...SwapIDProperties "P0"

                          ....Prop "Pin Type", "Bidirectional", "Text"

                          ...SwapIDProperties "P1"

                          ....Prop "Pin Type", "Bidirectional", "Text"

                          ..Symbol "Diode_LED:LED"

                          ...Default

                          ...Symbol_Swapgroup "gate"

                          ....PinName "A"

                          ....PinName "C"

                          ..Slots

                          ...Slot_Swapgroup "gate"

                          ....SlotID 1

                          ....SwapCode 0

                          ....PinNumber "1"

                          ....PinNumber "2"

                         

                        I hope it is not too much to ask, but is it possible to fine-tune the syntax?

                        That would be a great help to us.

                         

                        Thanks.

                         

                        Wim.

                        • 9. Re: Replacement script for PDB2HKP ASCII output
                          al_layson

                          Wim,

                          Sorry but I do not know hkp format and it is not published.

                          Regards,

                          Al

                          • 10. Re: Replacement script for PDB2HKP ASCII output
                            Wim Creyghton

                            Al,

                            That's why I added a snippet from the HKP format (see above).

                            It's this part we need for our program:

                             

                              ..SwapGroup "gate"

                              ...SwapID "P0"

                              ...SwapID "P1"

                              ...SwapIDProperties "P0"

                              ....Prop "Pin Type", "Bidirectional", "Text"

                              ...SwapIDProperties "P1"

                              ....Prop "Pin Type", "Bidirectional", "Text"

                              ..Symbol "Diode_LED:LED"

                              ...Default

                              ...Symbol_Swapgroup "gate"

                              ....PinName "A"

                              ....PinName "C"

                              ..Slots

                              ...Slot_Swapgroup "gate"

                              ....SlotID 1

                              ....SwapCode 0

                              ....PinNumber "1"

                              ....PinNumber "2"

                             

                            Especially the PinNane and PinNumber where the program makes a translation list which Symbol PinName correspondents with which Cell PinNumber.

                            This list is used in the netlist conversion.

                            In you VBS code I see the line:

                             

                            Sub RptPins(part)

                            Dim gate,slotnum,slot,pin,pd,pintype,cell,nc,nr,sup,prop,sym,line

                             

                            So I think it is possible to extract the "gate", "slotnum" and "slot" information.

                             

                            It would really help me if it is possible to get this information in the output generated by your VBS code.

                             

                            Thanks in advance.

                             

                            Wim.

                             

                             

                            • 11. Re: Replacement script for PDB2HKP ASCII output
                              al_layson

                              Wim,

                              GSS - Global Support & Services do have Productivity Services, where we offer scripting consultation and development services for a fee. If you don't want to go this route then please review the documentation "Library Management and Library Editors Automation Reference" (library_editors_auto.pdf). All the information to retrieve the information you need is there.

                              Regards,

                              Al

                              • 12. Re: Replacement script for PDB2HKP ASCII output
                                austin.t.morgan

                                Is there a similar script or recommendation to "write back" the information into the pdb. The syntax this produces is perfectly fine, if we can modify or add properties and write them back into the pdb.