Block.AddNet(ByVal Locationx1 As Long, ByVal Locationy1 As Long, ByVal Locationx2 As Long, ByVal Locationy2 As Long, ByVal CompPin1 As IVdCmpPin, ByVal CompPin2 As IVdCmpPin, ByVal BusOrWire As VdBusOrWire) As IVdNet
All coordinates are measured in 100ths of an inch.
Starting X location.
Starting Y location.
Ending X location.
Ending Y location.
Component Pin 1. May be NULL if not used.
Component Pin 2. May be NULL if not used.
Adds a Bus or a Wire type net. Indicates what kind of net will be added (Bus) or (Wire). This is of the form VdBusOrWire Enum.
As IVdNet. The newly created Net Object.
You can add a net to a block between:
Two locations X1,Y1 X2,Y2.
Two component pins CompPin1 CompPin2.
Any combination of Location X,Y and Component Pin.
The following example shows various combinations of the AddNet method.
Dim NullPin
Set NullPin=Nothing ' Makes a NULL object
'Adds Wire Net from (100,100) to (0,0)
Set N1 = ActiveView.Block.AddNet(100,100,0,0,NullPin,NullPin,VD_WIRE)
'Adds Wire Net from (100,100) to Cp1
Set N2 = ActiveView.Block.AddNet(100,100,0,0,Cp1,NullPin,VD_WIRE)
'Add Wire net between two component pins Cp1,Cp2
Set N3 = ActiveView.Block.AddNet(0,0,0,0,Cp1,Cp2,VD_WIRE)