Q: save/restore the selection filters of LSW

Discussion in 'Cadence' started by fogh, Nov 7, 2005.

  1. fogh

    fogh Guest

    Hi All,

    as a follow up to the selection swap (
    http://groups.google.com/group/comp...elset+fogh&rnum=1&hl=en&#doc_a2c9225b2207fe19
    )
    I want to have the ability to save and restore the state of the
    selection filter.This is necessary because there is no
    geSelectFigPointNoFilter()
    That seems easy enough for schematics, but I can t find a clean way to
    do this with the LSW. The layer can probably be dealt with
    leSetLayerAttributes() and techGetLeLswLayers() , but I can t find a
    good way to deal with the objects. Especially if I want to make code
    that would work properly in all versions since 5.0.33

    Is there a layout SKILL guru who can help ?

    TIA.
     
    fogh, Nov 7, 2005
    #1
  2. fogh

    S. Badel Guest

    I want to have the ability to save and restore the state of the
    By "selection filter", do you mean which layers are selectable, as and wether
    instances and pins are selectable - well actually what's in the lsw?

    If yes, then that shouldn't be very hard to do with the following functions :

    - leIsInstSelectable
    - leSetInstSelectable
    - leIsPinSelectable
    - leSetPinSelectable
    - leIsLayerSelectable
    - leSetLayerSelectable
    - leSetAllLayerSelectable
    - leGetValidLayerList

    If not, could you elaborate?

    cheers,

    Stéphane
     
    S. Badel, Nov 7, 2005
    #2
  3. fogh

    Trevor Bowen Guest

    I believe these objects map to simple LPP's:

    instance -> "instance" "drawing"
    pin -> all layers with purpose "pin"
    marker -> "marker" "warning"/"error"
    row -> "row" "drawing"
    prBdy -> "prBoundary" "boundary" (but not "drawing", weird!)
    snapBdy -> "snap" "boundary"

    You can get/set the status by manipulating these LPP's directly in the LSW.

    The only one that I could change my manipulating the
    selectability/visiablity is "instance". I could change visability, but
    not the selectability by manipulating the "instance" "drawing" LPP.

    Coupling this with:

    - leIsLayerSelectable
    - leSetLayerSelectable

    You should be in good shape!

    *NOTE*: There may be an OA layer or even a special dfII tech prop
    beyond what I could see in my simple dfII database, but this worked for me.
     
    Trevor Bowen, Nov 7, 2005
    #3
  4. fogh

    Trevor Bowen Guest

    Argh... Should read:

    The only one that I could *not* change *by* manipulating the
    selectability/visibility is "instance". I could change visibility, but
    not the selectability by manipulating the "instance" "drawing" LPP.
     
    Trevor Bowen, Nov 7, 2005
    #4
  5. fogh

    fogh Guest

    yes. I mean that. I want to know wether they are selectable, visible,
    valid(for layers). I would rather, if I give another go at this
    secundary buffer utility, that it is robust against any manipulation of
    the layers and objects, and that it works well with mosaics too (damn
    mosaics!).
    I found these in the manual, but I am still missing the object
    visibility, and the selectability for marker, row, prBdy, snapBdy
    I also noticed that the edit->save / edit->load does not restore these
    (so using a temporary file and the corresponding ^leHi.* is no
    workaround ).
     
    fogh, Nov 8, 2005
    #5
  6. fogh

    fogh Guest

    Trevor,

    never mind. I got your point.
    With your explanations it all seems more simple than at first sight. I
    ll give it a go soon.
     
    fogh, Nov 10, 2005
    #6
  7. fogh

    fogh Guest

    Trevor,

    the first draft does not work too well. Visibility toggles fine, but
    selectability does not. Would you have an idea ?

    Here is what I tried (sorry, bad indentation again):

    procedure( CmLeGetLSWState(@optional (cv nil) )
    let( (tf tl layerstate lswstate)
    cv || ( cv=geGetEditCellView() )
    tf=techGetTechFile(cv)
    tl=tf->layers
    layerstate=foreach(mapcar l tl list(l->valid l->selectable l->visible))
    lswstate=cons(leIsInstSelectable(tf) layerstate)
    );let
    );proc

    procedure( CmLeSetLSWState(l_lswstate @optional (cv nil) )
    let( (tf tl layerstate)
    cv || ( cv=geGetEditCellView() )
    tf=techGetTechFile(cv)
    tl=tf->layers
    layerstate=cdr(l_lswstate)
    foreach( (l s) tl layerstate
    ;info("%L\t\%L\t%L\n" l->name l->purpose s)
    ; l->valid=car(s)
    ; l->visible=caddr(s)
    ; l->selectable=cadr(s)
    ; leSetLayerSelectable(list(l->name l->purpose) cadr(s) )
    ;info("%L\t\%L\t%L\n" l->name l->purpose list(l->valid l->selectable
    l->visible))
    leSetLayerAttributes(tf cons(list(l->name l->purpose) s) )
    )
    leSetInstSelectable(car(l_lswstate))
    );let
    );proc
     
    fogh, Nov 13, 2005
    #7
  8. fogh

    fogh Guest

    All,

    I had more sucess with the second go, but i would like some review anyway:

    procedure( CmLeGetLSWState(@optional (cv nil) )
    let( (tf tl layerstate lswstate)
    cv || ( cv=geGetEditCellView() )
    tf=techGetTechFile(cv)
    tl=tf->layers
    layerstate=foreach(mapcar l tl copy(list(
    l->valid
    leIsLayerSelectable(list(l->name l->purpose))||(not(l->valid) &&
    l->selectable)
    l->visible)) )
    lswstate=cons(leIsInstSelectable(tf) layerstate)
    );let
    );proc

    procedure( CmLeSetLSWState(l_lswstate @optional (cv nil) )
    let( (tf tl layerstate)
    cv || ( cv=geGetEditCellView() )
    tf=techGetTechFile(cv)
    tl=tf->layers
    layerstate=cdr(l_lswstate)
    leSetInstSelectable(car(l_lswstate))
    foreach( (l s) tl layerstate
    l->valid=car(s)
    l->selectable=cadr(s) l->selectable=cadr(s)
    leSetLayerSelectable(list(l->name l->purpose) cadr(s) )
    l->visible=caddr(s)

    l->visible))
    )
    );let
    );proc
     
    fogh, Nov 13, 2005
    #8
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.