1 Reply Latest reply on Aug 14, 2017 5:26 AM by fuba

    xDx get Component Pin Direction (in,out,bi) via Script

    fuba

      Hello out there,

      I am looking for a way to get the Dirction of a Component Pin, if it is Input, Output, or Bidirectional.

      Any Ideas where the Property can be found ?

       

      Thank you

        • 1. Re: xDx get Component Pin Direction (in,out,bi) via Script
          fuba

          Hello,

           

          I found something out on my own, pls. see VBA code below:

           

          '# We try to get Pin Direction
          '# (Pin = in, out, bi, ...)
          Dim numOfAttributes As Integer
              numOfAttributes = Con.CompPin.Pin.Attributes.Count
          
          Dim j As Integer
          
          For j = 1 To numOfAttributes
          Dim pinAttrib As ViewDraw.Attribute
            Set pinAttrib = Con.CompPin.Pin.Attributes.Item(j)
          Debug.Print "attributeName: " & pinAttrib.name & " --> Value: " & pinAttrib.Value
          Next
          

          This code gave me what I was looking for. Working via "FindAttribute" was'nt successful so far, any Ideas, how to accomplish this ?

           

          Thanks