Assign via on Net using vb script in Pads Layout

Status
Not open for further replies.

venkateswaran

Newbie level 2
Joined
Aug 13, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
22
Hi,
I have requirement to assign a via on the nets which has without any via points. So i have written automation script using vb to assign via on net here the issue is not assigning any via on net.

I appreciate your help on this.

Code:
.----------------------------------
Sub Main()

Dim PowerPcbapp As Object
Dim docu As Object
Set PowerPcbapp = GetObject(, "PowerPCB.Application")
Set docu = PowerPcbapp.ActiveDocument

Set PowerPcbapp = Nothing
tpnts = GetviaPoints(docu, True)
'MsgBox Pcbapp.ActiveDocument.Name

End Sub
-------------------------------------------------------
Function GetviaPoints(doc As Object, Optional Sorted As Boolean = False)
Set GetviaPoints = doc.GetObjects(0)
Set nets = doc.nets
If Sorted Then nets.Sort
For Each aNet In nets
Set vias = aNet.vias
If vias.Count > 0 Then
viaavail = True
Else
viaavail = False
GetviaPoints.Add aNet
End If
Next

End Function

Regards,
venkateswaran K
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…