AddNetEx Method (Block Object)

Scope: Schematic editor

Object: Block Object

Prerequisites: None

Adds a net to the block.

Usage

Block.AddNetEx(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

Arguments

Note:

All coordinates are measured in 100ths of an inch.

Locationx1

Starting X location.

Locationy1

Starting Y location.

Locationx2

Ending X location.

Locationy2

Ending Y location.

CompPin1

Component Pin 1. May be NULL if not used.

CompPin2

Component Pin 2. May be NULL if not used.

BusOrWire

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.

Return Values

As IVdNet. The newly created Net Object.

Description

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.

Examples

The following example shows various combinations of the AddNetEx method.

Dim NullPin 
 
Set NullPin=Nothing ' Makes a NULL object 
 
'Adds Wire Net from (100,100) to (0,0) 
Set N1 = ActiveView.Block.AddNetEx(100,100,0,0,NullPin,NullPin,VD_WIRE) 
 
'Adds Wire Net from (100,100) to Cp1 
Set N2 = ActiveView.Block.AddNetEx(100,100,0,0,Cp1,NullPin,VD_WIRE) 
 
'Add Wire net between two component pins Cp1,Cp2 
Set N3 = ActiveView.Block.AddNetEx(0,0,0,0,Cp1,Cp2,VD_WIRE)