3 Replies Latest reply on May 11, 2012 1:17 PM by john_dube

    How to go to the sheet of desired components?

    vkhurana

      In DxDesigner's automation model, what's the best function or combination thereof, that can be used to go to/jump to/open the sheet(s) of the desired component?  In other words, say the components of interest are U110, U230, U332, and U440 and they are on different pages as well as different levels of hierarchy, in the design.  I want to know how to visit each schematic sheet where these 4 components reside...any ideas?

        • 1. Re: How to go to the sheet of desired components?
          john_dube

          You need to go through the design hierarchy once to build a map of refdes to component id - keep in mind that there will be multi-gate devices where the same refdes is used on multiple instances.

           

          Once you have the UID, you can call the SelectPath method.  See Reference Designator Assignment based on schematic location for an example of how to do both.

           

          John

          • 2. Re: How to go to the sheet of desired components?
            vkhurana

            Thanks John,

             

            I looked at the 2 efms and 1 vbs but couldn't find SelectPath usage.

             

            Can you please explain why we need to build a map of refdes to component id - how does that help?  Secondly, SelectPath method utilizes the hierarchical path so does that mean that for a component that's at a lower level in hierarchy, it's hierarchical path is composed of block (name) and it's uid?

             

            Varun

            • 3. Re: How to go to the sheet of desired components?
              john_dube

              Sorry, I did not use SelectPath, I used PushPath, inside this function that is called when you double-click a row:

               

              Function SelectHierarchicalPath(sTopBlockName, sFullPath)

              iLastColon = InStr(sFullPath, ":")

              iLastSlash = InStrRev(sFullPath, "\")

              If iLastSlash > 0 Then

              sPath = Mid(sFullPath, 1, iLastSlash - 1)

              sUID = Mid(sFullPath, iLastSlash + 1, iLastColon - iLastSlash - 1)

              Else

              sPath = ""

              sUID = Mid(sFullPath, 1, iLastColon - 1)

              End If

              sSheet = Mid(sFullPath, iLastColon + 1)

              PushPath sTopBlockName, sPath, sSheet

              ExecuteCommand "sname " & sUID

              End Function

               

              If you look at the other code in this efm file, you will see the full path is built up with the hierarchical path, followed by the uid, followed by the sheet number.

               

              There is no way to search the whole design for a particular reference designator through automation, that is why you need to build this map of refdes to uid & sheet.

               

              John