2 Replies Latest reply on Jul 20, 2011 10:12 AM by phillip.kreider

    Extracting Pin Type from DxDesigner

    phillip.kreider

      How does one extract "Pin Type" using automation in DxDesigner?  I checked the attributes of each pin, and only find Pin Number on some pins, yet the schematic attributes block shows Pin Type and Pin Number as SYMBOL Values.

        • 1. Re: Extracting Pin Type from DxDesigner
          andrew.french

          I feel like this should work, its in C#.

          VDView is the ActiveView of the ViewDraw Application.

           

          ViewDraw.IVdObjs pins = VDView.Query(ViewDraw.VdObjectTypeMask.VDM_COMPPIN, ViewDraw.VdAllOrSelected.VD_ALL);

           

          for (int z = 1; z <= pins.Count; z++)

          {

               ViewDraw.ComponentPin p = pins.Item(z);

               MessageBox.Show(p.Type.ToString());

          }

           

           

           

           

          • 2. Re: Extracting Pin Type from DxDesigner
            phillip.kreider

            Thanks.  I was missing the CompPin.pin portion.  Below is a snippet from my final vbs code

             

                    For Each objCn in objCp.GetConnections()
                        Set cPin = objCn.CompPin
                        Set cNet = objCn.Net
                        If Not cNet Is Nothing Then
                            net = objCn.Net.GetConnectedNetName(objCn.Segment)

                            set oAttr = cPin.pin.FindAttribute("Pin Type")
                            If oAttr Is Nothing Then
                                pinType = "NONE"
                            Else
                                pinType = oAttr.EitherValue()
                            End If