AnsweredAssumed Answered

Can you use the scipting language to change Net names?

Question asked by baxsie on Mar 2, 2011
Latest reply on Mar 28, 2012 by jim.granville

I'm looking to selectively name some of my Nets with the same name as the pin function they are connected to on my processor.  I thought a simple script could do this.


Sub Main

    Dim objs As Object

    Set objs = ActiveDocument.GetObjects(plogObjectTypePin,,True)

    If objs.Count = 1 Then

        MsgBox "Pin " + objs.Item(1).FunctionName + " Selected and Connected to " + objs.Item(1).Net.Name + ".  Net renamed to match pin function."

>>>  objs.Item(1).Net.Name = objs.Item(1).FunctionName


        MsgBox "One Pin Not Selected"  

    End If  

End Sub


The line with the >>>> gives a vauge error when run:

(10097) ActiveX AutomationL wrong number of parameters


Maybe you cannot change the Net names in that manner?  Is there another way to change a Net name with a script?


Thank you.