Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Assign via on Net using vb script in Pads Layout

Status
Not open for further replies.

venkateswaran

Newbie level 2
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top