I am trying to add nets to a DxDesigner schematic using Visual Basic .NET, but the following line throws 0x80020005 (DISP_E_TYPEMISMATCH) exception.
Dim net2 = app.ActiveView.Block.AddNet(80, 80, 100, 100, Nothing, Nothing, ViewDraw.VdBusOrWire.VD_WIRE)
I do not want to connect my nets anywhere yet. I have seen several vbscript examples where used Nothing as the pins argument, but it does not seems to be working from .NET.
I have also passed vbNull, 0 as those arguments.
I've successfully used this:
dim null_pin as Object
null_pin = Nothing
net = app.ActiveView.Block.AddNet(x, y, x1, 1y, null_pin , null_pin , 0)