changing pathwidth while using "enterPath" funtion

Guest
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@gmail.com wrote, on 02/05/09 13:30:
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"
)
)
Do you mean if you change the entry layer in the LSW after calling enterPath1()?
Or before calling enterPath1()?

Regards,

Andrew.
 
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@gmail.com wrote, on 02/06/09 12:35:
If this is possible by using only form then that too is ok...
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.
 
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
 
Hu Sudha,

Some comments below:

sudhasubramaniam@gmail.com wrote, on 02/09/09 05:57:
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"
This should be ?form form1 (i.e. no quotes)

?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"
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.

?value techGetSpacingRule(techGetTechFile
(geGetWindowCellView()) "minWidth" form1~>input1~>value)
)
)

)
This next line makes no sense - the form has not been displayed yet.

hiToggleEnterForm(form1)

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


Regards,
Sudha
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.
 

Welcome to EDABoard.com

Sponsor

Back
Top