changing pathwidth while using "enterPath" funtion

Discussion in 'Cadence' started by sudhasubramaniam, Feb 5, 2009.

  1. HI,

    I'm using enterPath function. I want to synchronise the width of the
    rubber band with the minwidth of entry layer of LSW. I don't want to
    use a form to get the entry layer width. I'm using below code to get
    width, but the width is not getting updated whenever i change the
    layer in LSW window. Can any one suggest a solution with examples?

    procedure(Points1( w_windowId b_done l_points )
    printf( "List of points entered %L\n" l_points )
    )

    procedure(enterPath1()
    enterPath(
    ?prompts list(
    "Enter the first point:"
    "Enter the next point:"
    )
    ?pathWidth techGetSpacingRule(techGetTechFile(geGetWindowCellView())
    "minWidth" car(leGetEntryLayer()))
    ?doneProc "Points1"
    )
    )
     
    sudhasubramaniam, Feb 5, 2009
    #1
  2. Do you mean if you change the entry layer in the LSW after calling enterPath1()?
    Or before calling enterPath1()?

    Regards,

    Andrew.
     
    Andrew Beckett, Feb 5, 2009
    #2
  3. Hi Andrew,


    I'm trying to use enterPath function for drawing a path along with
    dbCreatePath. So after calling my enterPath1 if I change the entry
    layer in the LSW the rubber band width should change to minwidth of
    that entry layer.
     
    sudhasubramaniam, Feb 6, 2009
    #3
  4. If this is possible by using only form then that too is ok...
     
    sudhasubramaniam, Feb 6, 2009
    #4
  5. I'm not aware of a way of triggering when the user changes the entry layer; the
    function leRegUserLayerSelectionFilter (which I thought might work) doesn't get
    triggered upon entry layer choice, but rather when a layer is made selectable -
    so that's no good.

    The only way I can think of doing this requires use of a private SKILL function
    to detect the change.

    So I think you'd need to add an options form to your enterPath function, perhaps.

    Regards,

    Andrew.
     
    Andrew Beckett, Feb 6, 2009
    #5
  6. Hi Andrew,

    I was trying to use option form along with enterPath to draw a path,
    but it is not working.Can you please have a look at this?

    procedure(Points1( w_windowId b_done l_points )
    layer = car(leGetEntryLayer()) ; LSW layer
    purpose = cadr(leGetEntryLayer()) ; LSW purpose
    list_draw_layer=list(layer purpose) ; ..LSW LAYER
    tec=techGetTechFile(geGetWindowCellView())
    width1=techGetSpacingRule(tec "minWidth" layer)
    dbCreatePath(geGetWindowCellView() list_draw_layer l_points width1)
    printf( "List of points entered %L\n" l_points )
    )

    procedure(enterPath1()
    enterPath(
    ?prompts list(
    "Enter the first point:"
    "Enter the next point:"
    )
    ?form "form1"
    ?pathWidth form1~>input2~>value
    ?doneProc "Points1"
    )
    )

    form1=hiCreateOptionsForm(
    'form1
    "create path"
    list(
    hiCreateStringField(
    ?name 'input1
    ?prompt "Layer Name"
    ?value car(leGetEntryLayer())
    ?callback "lib()"
    )
    hiCreateFloatField(
    ?name 'input2
    ?prompt "Layer width"
    ?value techGetSpacingRule(techGetTechFile
    (geGetWindowCellView()) "minWidth" form1~>input1~>value)
    )
    )

    )
    hiToggleEnterForm(form1)

    procedure(lib()
    form1~>input1~>value=car(leGetEntryLayer())
    form1~>input2~>value=techGetSpacingRule(techGetTechFile
    (geGetWindowCellView()) "minWidth" form1~>input1~>value)
    );


    Regards,
    Sudha
     
    sudhasubramaniam, Feb 9, 2009
    #6
  7. Hu Sudha,

    Some comments below:

    This should be ?form form1 (i.e. no quotes)
    You can't reference form1~>input1~>value whilst you're creating the form,
    because it doesn't exist yet. You need to use car(leGetEntrylayer()) again.
    This next line makes no sense - the form has not been displayed yet.
    However, even having done this, it has a rather bizarre use model. If I try to
    type in the name of the new layer in the first field, it only lets me do it if
    it's the same as the entry layer. Probably it would be better to not use the
    entry layer, but just use a layer cyclic field on the form?

    Also, changing the path width has no effect. Probably you'd want a callback on
    that field, which calls a function using changeEnterFun() to change the
    pathWidth of the current enter function.

    Finally, you should use sensibly named global variables and function names -
    having functions called lib, enterPath1 and variables called form1 are very
    likely to clash with other similarly written functions - if you don't take care.
    So the convention is to give a prefix to functions and global variables -
    preferably one beginning with an uppercase letter to avoid clashing with Cadence
    functions.

    I didn't have time to completely rewrite your code for you, because I'm not
    really sure of your intention (and I didn't have time anyway).

    Regards,

    Andrew.
     
    Andrew Beckett, Feb 9, 2009
    #7
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.