I would also like to have a script that could do this; would be nice to find out if it can be done.
You can just loop over all segments of all nets, and keep track of the number of solder dot joints at a particular location. If there are 4 segments with the same solder dot joint, you have a 4 way net connection.
Dim objNet, objSeg, iJoint, iJointX, iJointY, sKey
Dim dictSolderJoints : Set dictSolderJoints = CreateObject("Scripting.Dictionary")
For Each objNet In vdapp.ActiveView.Query(VDM_NET, VD_ALL)
For Each objSeg In objNet.GetSegments
For iJoint = VDJ_LOW To VDJ_HIGH
iJointX = objSeg.Location(iJoint).X
iJointY = objSeg.Location(iJoint).Y
sKey = iJointX & "," & iJointY
If objSeg.GetJointType(iJoint) = VDJT_SOLDER Then
dictSolderJoints(sKey) = dictSolderJoints(sKey) + 1
For Each sKey In dictSolderJoints
If dictSolderJoints(sKey) > 3 Then
MsgBox "4 way solder joint at " & sKey
This script works with the current sheet, you can extend the script to iterate over all schematic sheets (make sure to clear out the dictSolderJoints dictionary for each sheet).
Thanks!!! I'll try this out.
The code works great and is greatly appricated!
I'd like to create a list of these ties across an entire schematic without having to open each sheet, then present the list to the user. After presenting the list to the user, I'd like to allow the user to open the schematic sheet where the tie is listed and select it.
I've seen a post somewhere on here how to visit each schematic sheet without opening it (not this one: http://communities.mentor.com/docs/DOC-1345) to search for all the nets. But I can't seem to find it now. Even after finding all the nets in the design, how do I keep track of which schematic sheet that net / 4 way tie is on, then how do I open a view of that tie and zoom in to it? On the single sheet version, I just do:
Private Sub Jump_To_tie(ByVal index As Integer)
For seg As Integer = 0 To fourwayties(index).pointcount - 1
vdApp.ActiveView.SelectSegmentByJointLoc(fourwayties(index).X(seg), fourwayties(index).Y(seg), ViewDraw.VdJointType.VDJT_SOLDER)
The fourwayties is a List(Of tie), and tie is a class:
Public X As List(Of Integer)
Public Y As List(Of Integer)
Public pointcount As Integer
Public seg As ViewDraw.CVdSegment
Public joint As Integer
Public block As ViewDraw.Block
so I can add anything to the dictionary or class that I need for a specific tie.
My questions are:
- How do I find all of the segments on all nets across the entire design without opening each schematic sheet?
- What do I need to store for a joint so I can reference it later?
- How do I jump to a joint based on the info stored previously and zoom in on it?
I've seen pieces of the answer in this forum previously, but can't seem to find them now.
fixed script formatting
You can try Application.DesignNets, however I don't have any first-hand experience with using this method.
Assuming that works, just record the schematic name (block and sheet name), then update your JumpToTie to open the sheet before calling ActiveView.SelectSegmentByJointLoc.