My purpose is to get the pin length where pin is associated with any component symbol. I am trying to get the location of pin in X, Y coordinates at both side of the pin and then by subtracting them to get the pin length. Through this i would also able to know whether Pin is horizontally or vertically drawn. My overall purpose is to display the Text as Pin property which should not overlap with Pin numbers or adjacent Pins.
I am using Pin.GetLocation() and getting the location of only one side of pin which is closest to bounding box. But when i am trying to use Pin.GetLocation(0) or Pin.GetLocation(1) it is throwing error.
(ByVal Flag As VdPinEndType) As IVdPoint where VdPinEndType is constant as defined below:
Boundary location (closest to bounding box). The numerical value for this constant is 1.
Interior location (furthest from bounding box). The numerical value for this constant is 0.
My code which is working:
For Each Pin in Activeview.Query(4096, 1)
Set Comp = Pin.Parent
Set Loc = Pin.GetLocation()
Set txt = Pin.AddAttribute("Hanging", Loc.X, Loc.Y, 1)
but when i change the line below to get both side of Pin coordinates
Set Loc = Pin.GetLocation(0)
It is failing....