AnsweredAssumed Answered

retrieving pin number

Question asked by shainaor on May 27, 2019
Latest reply on May 28, 2019 by peter_festesen

Hi,

I'm trying to collect schematic info for post processing. I would like to get for each refdes.pinnumber to which net it is connected and on which page.

 

I got the following code for that mission, only problem is is that for certain symbols instances the pin number is empty

and for other instances of the same symbol I do get the pin number.

 

any idea?

 

Shai

 

    For Each sSchematic In Application.SchematicSheetDocuments.GetAvailableSchematics 

        For Each sSheet In Application.SchematicSheetDocuments.GetAvailableSheets(sSchematic) 

            Application.SchematicSheetDocuments.Open sSchematic, sSheet 

            For Each objComp In Application.ActiveView.Query(VDM_COMP, VD_ALL) 

                refdes = objComp.Refdes ' first run to get the refdes & "." & pin_number & "," & snet & "," & sSheet

                if not (refdes = "") then

                    For Each conn In objComp.GetConnections

                        Set cmppin = conn.CompPin

                        if Not (cmppin is nothing) then

                            pin_number = cmppin.Number

                            Set lnet = conn.Net

                            if Not (lnet is nothing) then

                                snet = lnet.GetConnectedNetName(conn.Segment)'logicalnetname

                                 MyFile.WriteLine refdes & "." & pin_number & "," & snet & "," & sSheet                           

                            end if

                        end if

                    Next   

                end if

            Next

result example :

Q58_4361.6,RVSET_0P9V_ATSE1_VCCERAM,+0P9V_ATSE1_VCCERAM
Q58_4361.1,VADJ_LOW_0P9V_ATSE1_VCCERAM,+0P9V_ATSE1_VCCERAM
Q58_4361.2,FPGA_MARGIN_LO,+0P9V_ATSE1_VCCERAM
Q58_4361.3,RVSET_0P9V_ATSE1_VCCERAM,+0P9V_ATSE1_VCCERAM
Q58_4361.4,VADJ_HIGH_0P9V_ATSE1_VCCERAM,+0P9V_ATSE1_VCCERAM
Q58_4361.5,FPGA_MARGIN_HI,+0P9V_ATSE1_VCCERAM

 

missing pin number example

Q58_4362.,RVSET_0P9V_ATSE2_VCCERAM,+0P9V_ATSE2_VCCERAM
Q58_4362.,VADJ_LOW_0P9V_ATSE2_VCCERAM,+0P9V_ATSE2_VCCERAM
Q58_4362.,FPGA_MARGIN_LO,+0P9V_ATSE2_VCCERAM
Q58_4362.,RVSET_0P9V_ATSE2_VCCERAM,+0P9V_ATSE2_VCCERAM
Q58_4362.,VADJ_HIGH_0P9V_ATSE2_VCCERAM,+0P9V_ATSE2_VCCERAM
Q58_4362.,FPGA_MARGIN_HI,+0P9V_ATSE2_VCCERAM

Outcomes