Creating a net in Python

First create a new NETINFO_ITEM instance.

net = NETINFO_ITEM(board, "net_name")

Add this net to ‘board’, this will assign a ‘net code’ to your net.

board.AppendNet(net)

Learn the net code:

print(net.GetNet())

Assign net to a certain track:

track.SetNetCode(net.GetNet())
1 Like