1 Reply Latest reply on May 8, 2012 12:57 PM by john_dube

    Problem Using SetLocation; "Cannot use parantheses when calling a Sub"

    mjohnson

      I am trying to use SetLocation to put a label in position, but it doesn't appear to be working. I have looked around at others' uses of SetLocation, and I think I should be correct, but I must be missing something. I want to add a "link" from the "generic" partition to my net. then, I want to get the label that gets created when doing that and set its location and align it.

       

      netEndLocX is simply the location I drew the wire to, and longCompY is the Y-coordinate of the pin the net connects to. The link gets created in line with the pin and wire. strLink determines the type of link (offpage, onpage, nc)

       

       

            Set objLinkSym = ActiveView.Block.AddSymbolInstance("generic", strLink, netEndLocX, longCompY)

            objLinkSym.Label.SetLocation(netEndLocX,longCompY)

            objLinkSym.Label.Origin = VDALIGN_LR

       

      I get the following error:

       

      "Cannot uses parantheses when calling a Sub", referring to the SetLocation line. Any help would be greatly appreciated.