discuss-gnu-electric
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Any BeanShell example for 8.08 : revisited


From: J Jacob Wikner
Subject: Any BeanShell example for 8.08 : revisited
Date: Tue, 31 Mar 2009 09:23:57 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

Hello,

we are kind of new to electric but really want to explore that path. However, we have a background with extensive scripting of our layouts and would like to see how that can be done in electric.

Now, initially, I get lost in the java classes and methods. I've seen the example in this group: "Any BeanShell example for 8.0.1?", but I would like to know if anyone has examples in beanshell on how to e.g.

  create a (layout) cell view and a library
  ... instantiate a transistor into that cell
  ... add a couple of vias and arcs,
  i.e., generate a simple inverter?

Essentially I use the following meta-approach (and fail):

        Cell lay = WindowFrame.getCurrentCell();
        NodeInst node1 = newInstance(lay, proto, "pmos", <etc>)
        lay.addNode()

But I get stuck... should I (search and) use other primitives, such as e.g.
        
  // assume technology information is properly inherited
  pTransId  = lay.addTransistor("pmos", pPoint2D, paramHash, orien);
  nTransId  = lay.addTransistor("nmos", nPoint2D, paramHash, orien);
  polyArcId = lay.connectNodes(nTransId.G, pTransId.G);
  metArcId  = lay.connectNodes(nTransId.D, pTransId.D);

etc.

Any simple example to start with would be highly appreciated.

Thanks in advance


//Jacob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]