Code to upsize existing wires with bind key.

Discussion in 'Cadence' started by eric.d.fitzsimmons, Mar 10, 2009.

  1. Andrew gave me this code below. It adds to the row of a selected
    contact(vias), is there a way to grow wires similarly? Looking into
    the Skill functions reference manual it appears not to be as simple.

    Thank you!
    Eric


    procedure(RowAddRoll(incr)
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>row=max((selObj~>row||1)+incr 1)
    )
    )
    );

    hiSetBindKeys( "Layout" list(
    list("Shift Alt<Btn4Down>" "RowAddRoll(1)");
    list("Shift Alt<Btn5Down>" "RowAddRoll(-1)");
    ))


    Btn4down and 5 are the "roll" on a mouse.
     
    eric.d.fitzsimmons, Mar 10, 2009
    #1
  2. eric.d.fitzsimmons

    Risky Guest

    It's essentially the same code. Assuming your grid is .005,

    procedure(RowAddRoll(incr)
    foreach(selObj geGetSelSet()
    when(leIsContact(selObj)
    selObj~>row=max((selObj~>row||1)+incr 1)
    )
    when(selObj~>objType == "path" || selObj~>objType == "wire"
    selObj~>width=max((selObj~>width||.01)+incr*.01 .01)
    )
    )
    );

    You can also use a method of getting your grid instead of hardcoding
    the grid value. It's double the grid value because otherwise the
    wire's edges will be off grid.
    I think this code is what you want, but I am not in a position to test
    it right this second, so caveat emptor.
     
    Risky, Mar 11, 2009
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.