drawing buses using enterPath() function

A

Abi

Guest
Hi All,

Is there any way to draw buses using enterPath() function.

In that i need to get 'width' 'space' and 'path name' for all the
paths as user input.

Thanks in advance.

Regards,

Abirami
 
Hi,

I get errors of unbound variables and extra ')' brackets when I paste
your code in my CIW so it will take time to debug.
I'm quite tied-up so I can just give some suggestions.
Could you use let(), prog() etc. to localize some of your variables?
I also suggest looking up "rodCreatePath()" function.
It's somewhere in the 'roduser' documentation guide.

Have you tried the code I posted in the "How to create shielded path?"
topic?
Is the function similar? If so, you don't need the 'Directions' field.
I believe you're missing ?callback options in the fields.

The callback can just point to a function such as:
....
?callback "IFRefreshValues_CB(\"Spacing\")"
....
?callback "IFRefreshValues_CB(\"Width\")"
....
procedure( IFRefreshValues_CB( input_string )
let( () ;put local variables here
case( input_string
....
....
.... ); end of procedure

The callback just means that the "IFRefreshValues_CB" (or whatever)
procedure will execute when you change a value.


Oh, and I suggest again to try the "rodCreatePath()" function. It
could save you on a lot of trouble.


Best regards,
I-FAB
 
Dear All,

I have written a skill code to draw path with shielding..In this case
i am able to get widths of the paths as user input.Same spacing i have
given between the paths.
I am able to draw paths with the specified width,but the spacing i am
not getting same as the user input.Can anyone help me to fix this
issue and i need to do one more modification in the code..that is
instead of common space i need to get two different spacings.

space1 : distance between upper shield and the net
space2 : distance bewtween lower shield and net

the code follows.

procedure(shield()
validlayer=techGetLayerFunctions(techGetTechFile(geGetWindowCellView
()))
j=0
declare(neededlayer[length(validlayer)])
for(i 0 (length(validlayer)-1)
l=nth(i validlayer)
if((nth(1 l)=="metal")
then
neededlayer[j]=list(nth(0 l) "drawing")
j= j+1
)
)
layerlist=vectorToList(neededlayer)

let((Width UWidth LWidth Space layer width cvId layer purpose
list_draw_layer)
path_Form()

declare(WIDTH[3])
Width=pathForm->Width->value
UWidth=pathForm->UWidth->value
LWidth=pathForm->LWidth->value
Space=pathForm->Space->value
layer=pathForm->layer->value
width=Width+UWidth+LWidth+(Space*2)
setarray(WIDTH 0 LWidth)
setarray(WIDTH 1 Width)
setarray(WIDTH 2 UWidth)

declare(myar[3])
name1=pathForm~>name1~>value
name2=pathForm~>name2~>value
name3=pathForm~>name3~>value
setarray(myar 0 name3)
setarray(myar 1 name1)
setarray(myar 2 name2)

cvId=geGetEditCellView()
layer = car(leGetEntryLayer())
purpose = cadr(leGetEntryLayer())
list_draw_layer=list(layer purpose)

for(k 0 2
procedure( pathDone( w done pts )
printf("Path entered was %L.\n" pts)
get_draw_path(pts Space list_draw_layer width)
println("Path entry aborted.")
;)
)
; )
enterPath( ?prompts
list( "Enter the first point."
"Enter the next point." )
?doneProc "pathDone"
?wantPoints 5
?pathWidth width
?pathStyle "Truncate"
)
)
);let
);procedure_line

procedure(ChangeLayer()
setlayer=hiGetLayerCyclicValue(techGetTechFile
(geGetWindowCellView()) pathForm)
leSetEntryLayer(list(setlayer~>name setlayer~>purpose))
tec=techGetTechFile(geGetWindowCellView())
layername=setlayer~>name
; space1=techGetSpacingRule(tec "minSpacing" layername)

; width=techGetSpacingRule(tec "minWidth" layername)
)

procedure(get_draw_path(path_list Space list_draw_layer width)
let((path_pitch len path_obj plogon_path list1 list2 i)
if((k==0)
then
path_pitch=(WIDTH[0]/2)+Space
else
path_pitch=Space+(WIDTH[k]/2)+((WIDTH[k-1])/2)
)
println(path_pitch)
; move_d=Space=WIDTH[k]/2
len=length(path_list)
path_obj=leCreatePath( cvId list_draw_layer path_list
width);....sample.path
plogon_path=dbConvertPathToPolygon
(path_obj) ;..polygon(....)
list1=plogon_path~>points
println(list1)
list2=reverse
(list1) ;..list....path....
dbDeleteObject
(plogon_path) ;..sample.path
for(j 0 2
get_new_path_list(list1 list2 path_pitch len)
list1=reverse(list_new_get)
path=dbCreatePath( cvId list_draw_layer list_new_get WIDTH[j])
myNet=nil
namelist=cvId~>nets~>name
name11=myar[j]
for(j 0 length(namelist)-1
if(name11 == nth(j namelist)
then
myNet= nth(j cvId~>nets)
);if
);for
if(myNet == nil
then
myNet = dbCreateNet(cvId myar[j])
);if
dbAddFigToNet(path myNet)

)
)
) ;let
;procedure

procedure(get_new_path_list(list11 list22 path_pitch len)
let((xnew ynew listxy11 listxy22 x1 y1 x2 y2)
list_new=list()
for(i 1 len
listxy11=nth(i-1 list11)
listxy22=nth(i-1 list22)
x1=car(listxy11)
y1=cadr(listxy11)
x2=car(listxy22)
y2=cadr(listxy22)
if( x2==x1 then
if(y2 > y1 then
xnew=x1
ynew=y1+path_pitch
else
xnew=x1
ynew=y1-path_pitch
)
else
if(x2 > x1 then ;.pitch
m=(y2-y1)/(x2-x1)
xnew=x1+path_pitch
ynew=y1+m*(xnew-x1)
else ;.pitch
m=(y2-y1)/(x2-x1)
xnew=x1-path_pitch
ynew=y1+m*(xnew-x1)
)

)
list_new=xcons(list_new list(xnew ynew)) ;...list_new
);for
list_new_get=list_new
println(list_new_get)
);let
);procedure

(procedure path_Form()

Width=hiCreateFloatField(
?name 'Width
?prompt "Width"
?value 0.0
?range (range 0 100)
)

UWidth=hiCreateFloatField(
?name 'UWidth
?prompt "UWidth"
?value 0.0
?range (range 0 100)
)

LWidth=hiCreateFloatField(
?name 'LWidth
?prompt "LWidth"
?value 0.0
?range (range 0 100)
)

Space=hiCreateFloatField(
?name 'Space
?prompt "Space"
?value 0.0
?range (range 0 100)
)

name1=hiCreateStringField(
?name 'name1
?prompt "Netname"
)

name2=hiCreateStringField(
?name 'name2
?prompt "upper name"
)

name3=hiCreateStringField(
?name 'name3
?prompt "lower name"
)

layer=hiCreateLayerCyclicField(
techGetTechFile(geGetWindowCellView())
"Layer"
"ChangeLayer()"
layerlist
)

pathForm=hiCreateForm(
'pathForm
"Path with shielding"
?fields (list
list(name1 0:0 200:30 80)
list(Width 240:0 175:30 70)
list(Space 420:0 200:30 80)
list(layer 0:50 200:30 80)
list(name2 240:50 175:30 70)
list(UWidth 420:50 200:30 80)
list(name3 0:100 200:30 80)
list(LWidth 240:100 175:30 80))

nil nil
)

(hiDisplayForm pathForm)

)
 

Welcome to EDABoard.com

Sponsor

Back
Top