7 Replies Latest reply on Feb 25, 2013 6:55 AM by clint.cote

    Trace length from pin to pin

    olsmir

      Hello All,

       

      Can anybody tell me, how to use Automation in ExpeditionPCB to get a trace length from one pin to another pin? The Traces collection for a selected net gives me the length of its segments (without any reference to pins of this net), rather than from pin to pin. In one topic I have read an advice to form a pin-pair in CES, assign some rule to it, then annotate the actual values from ExpeditionPCB back to CES. But I would use Automation only in ExpeditionPCB, without using CES.

       

      Oleg

        • 1. Re: Trace length from pin to pin
          john_dube

          Hi Oleg,

           

          You can use the ObjectsInBetween method to find the traces that connect two pins, then get the length of those traces.

           

          Here is a function that calculates the length between two pins:

           

          Function TraceLength(oPin1, oPin2)

               Dim dLen : dLen = 0.0

           

               ' get all the things between the two pins

               Dim objs : set objs = pcbDoc.ObjectsInBetween(oPin1, oPin2)

           

               ' if the collection is empty then it means there was no physical

               ' connection between the two pins.

               If objs.count > 0 Then

           

                    ' for each object in between the two pins; add up the delays from

                    ' all the traces in between the two pins. If we know the delay for

                    ' a via we could also include those.

                    Dim I, ob

                    For I = 1 To objs.Count

                         ' if something on a conductive layer

                         Set ob = objs.Item(I)

                         If ob.ObjectClass = epcbObjectClassConductorLayerGfx Then

                              ' must be a trace or an area on a conductor layer

                              If ob.Type = epcbCondGfxTrace then

                                   dLen = dLen + ob.Length

                              End If

                         End If

                    Next

               End If

               TraceLength = dLen

          End Function

           

          John

          1 of 1 people found this helpful
          • 2. Re: Trace length from pin to pin
            olsmir

            John, thank you very much. This is just what I need. Surprisingly, I haven't noticed such method earlier.

            Oleg

            • 3. Re: Trace length from pin to pin
              olsmir

              John, thank you very much.

              • 4. Re: Trace length from pin to pin
                trini

                John,

                I'm trying to utilize the script you provided. Must I select a piece of the route, pin, partial route first then invoke the command?

                Is there a report (window and or file) that I should be looking for with this information?

                Thanks,

                Trini

                • 5. Re: Trace length from pin to pin
                  john_dube

                  Hi Trini,

                   

                  The script I provided is just one function that calculates the trace length between two pins on a net.

                   

                  You'll need to write the rest of the script, it is up to you how to find which nets to process, which pins on those nets, and how to report the length calculated by the function.

                   

                  John

                  • 6. Re: Trace length from pin to pin
                    trini

                    That's what I was after... pin-to-pin report on a particular routed net. I

                    just don't know if I'm to select the desired trace or pin before I invoke

                    the script.

                    On the same note, whether I need to look for a file that is generated and

                    or simply reported on message window that gave me the info.

                    Thanks Again,

                    Trini

                     

                     

                     

                     

                     

                    From:     john_dube <community_admin@mentor.com>

                    To:     Trini Cantu <trini@raytheon.com>

                    Date:     02/22/2013 02:44 PM

                    Subject:     Re: - Trace length from pin to pin

                               

                     

                     

                     

                    • 7. Re: Trace length from pin to pin
                      clint.cote

                      In the AutoActiveToolKit there is a script that calculates the trace length actual, manhattan, factor and difference.  It's under the vbs/report folder named ReportNets.efm.  You can borrow the ReportNets function and modify to suit.