rtennill

add net to schematic by script?

Discussion created by rtennill on Jan 6, 2011
Latest reply on Mar 27, 2012 by rtennill

I'm using Pads Logic 9.2 and have been trying to come up with a method to add a net to an existing pin without having to edit the netlist directly. I know that there are methods to add gates and components to a sheet but I haven't stumbled across any sort of pin.AddNet method. My goal is to come up with a quick way to generate nets for high pin-count parts similar to how some popular FPGA schematic software adds port symbols for a block.

 

Am I headed down a dead end by avoiding editing the netlist directly or have I simply missed a key method?

 

my basic idea is:

 

for all pins of a selected part

     if pin.name = null then

          set new_part = sheet.addComponent(StubPart,pin.name,pin.posX+offset,pin.posY+offset)

          set new_net = sheet.addNet(new_part, Selected_part)

     end if

loop

 

There would have to be some logic behind the posX+n statement to make sure that a net was added in the right direction since most parts have pins on more than one side.

It would be even better if there was a way to just add the dangling net without adding part but this is what I came up with first.

 

Looking forward to seeing what you all suggest!

Outcomes