Chip123 科技應用創新平台
標題:
抓了一個修改via size skill file沒有效果, 請高手指點 ...
[打印本頁]
作者:
motofatfat
時間:
2010-10-24 07:26 PM
標題:
抓了一個修改via size skill file沒有效果, 請高手指點 ...
如題:內文如下
4 f1 i" `+ Z! D4 ]$ G
procedure( Main_Modify_Fun( )
) r5 O0 m& r/ q9 H$ I: M
prog( ( SizeField LIbField LayerField FormId )
8 w* ^3 `' A& a% ?' _; E' l1 ]
. X, i' ?" X2 V! A/ D. P
Size = hiCreateFloatField(
. ?- u% l, B4 z P9 y* `
?name 'Size
1 y2 \+ I" P2 g# g1 a% K
?prompt "Size Offset(+/-):"
. A; m% H+ S* ?* I
?value 0.1
* a8 V- p/ q; s" C1 f
?defValue 0.1
; y3 w/ y$ o9 |8 b$ u
)
5 T; Z% w- S9 W0 y, |, E
( a! Y+ x2 J8 j; x. v& E+ y* A
LibName = hiCreateStringField(
& o, w h. v& m g A
?name 'LibName
: i6 Z# Z5 D3 j& O( K
?prompt "Library Name:"
8 a& `; {4 ^0 e4 J' M' d4 \
?value ""
& P- D9 X9 s% L5 T% e! d
?defValue ""
# ~4 k$ D- r V# S: A
)
9 ?2 U8 Q5 h+ q& w- C! [
2 e7 I+ H0 c/ y4 y' t
Layer = hiCreateStringField(
+ x" z% u+ t A5 x# s$ z2 h1 C3 |- s
?name 'Layer
" r, q: ]7 J( O( l
?prompt "Layer Name:"
7 O7 _0 ~/ K% U
?value ""
6 G/ u/ [; o. v2 u
?defValue ""
6 m( i Y% ~6 I0 x' ?- B# r$ b
)
6 W% [/ o/ i. `
: p# f5 M, L7 Y/ }) N4 |( E% ^
label = hiCreateLabel(
. @, B% X7 f4 Q' X
?name 'Text
$ H4 y* e4 X# ?2 O: c; c
?labelText " sizing via "
% r3 d2 K5 a8 N+ N/ j
)
8 L& s2 e' j' Z8 ], N B- p( x- d
. t. x, G4 z% ~# l U
hiCreateForm(
# V* \! c# t) I/ S# ^0 g
'name
# ]& [5 P, E1 T: Q+ W X! }7 m
"Modify Via/Cont"
, r: m8 Z; P5 K8 p( {+ g4 f1 h
"Modify_Fun( name->Size->value name->LibName->value name->Layer->value)"
0 d: r9 ]; P0 C8 J
list( Size LibName Layer label)
2 O: W) G2 G* l
""
' G2 k) N1 r8 H1 L6 f, v: ~# P
""
( U- f/ h5 m! q6 P/ E. |5 J! d4 J
)
& C9 E; {6 E) v- |) V- r
5 ? c7 a/ D- }& d, B
4 `% Z+ a$ w4 N8 \6 c- s
hiDisplayForm( name )
, ~1 n1 r" O& d3 G! t- M6 ~5 Y% }
7 }9 X7 w! ~& c* U; y9 X9 V) q
) ;prog
- `- S) q# N/ t) j* P) ?+ C$ o
8 l/ Z7 K! a1 u
)
. n# K0 C, i+ Y: D: T4 V
/ u& R5 [: Q X* p$ _
3 \# {: i$ a& U
procedure(Modify_Fun(offset LibName Layer )
- |( y& E3 J4 U* d+ S
prog( ( cvId ObjList one two Cells LibId Shaps ll_x ll_y uu_x uu_y
) \, w4 a7 T+ U! k
ll uu )
8 T2 L- |% }6 l7 B
! O: y* @$ N2 A! J) d+ w0 ]
LibId = ddGetObj( LibName )
6 m/ F' @+ ?2 p* V7 i
Cells = LibId->cells
: l& ?% i5 A( P! I0 T/ b" k
5 P* p7 B& H6 \3 U
foreach( one Cells
) V X7 Y5 N* C3 ?$ N3 L
cvId = dbOpenCellViewByType( LibId one->name "layout" "" "a" )
* {, ]$ j6 ^! n3 c Z
Shapes = cvId->shapes
) B6 h3 a/ ]! N1 y" V) w
/ W9 G; [& m, V) I2 ]$ O# H; r
foreach( two Shapes
2 ^4 C% K2 t7 }% K- f
caseq( two->layerName
5 o8 V) j# e0 A5 s
" a: K8 ^* C) _$ m6 s
( "Cont"
/ e' O9 _2 ]' M6 X: r
/ Z( p7 H, d% Q" v- i
ll=lowerLeft( two->bBox )
( a* p. F' J" I8 }- L( w0 x
uu=upperRight( two->bBox )
) H: ?1 ?" v* |) Y
! f* e( g5 K# s' L n
ll_x = xCoord( ll ) - offset
3 {9 ] M: L7 ?) o- ?" {" s
ll_y = yCoord( ll ) - offset
. B# M1 N, J i }6 @* ]5 i$ X* W
2 P" _" @5 B: B! T( \ P T
uu_x = xCoord( uu ) + offset
: Y% O$ |( i; R# m9 ]3 i
uu_y = yCoord( uu ) + offset
2 O8 T/ P1 M% s5 o& C4 @2 `
' X4 A- M: Y2 e3 v
dbCreateRect( cvId Layer list( ll_x:ll_y uu_x:uu_y ) )
2 s$ o9 S+ v! e# t! v% {
dbDeleteObject( two )
4 `8 q+ w& P6 a3 L, S
; L( b+ L0 k1 i# F6 n+ v) W
printf("%s------> ok\n" one->name )
$ ]& M+ V& e$ w/ D N
- G3 ~: a. F4 y- \% y9 v
) ; end Layer
" ~. |' }; q# c5 U2 h
. S2 c. f6 k8 Y* C: A; A3 t
) ;case
! T5 G6 U4 O. W/ E
& L$ E! U& A y7 ?% U& M
) ; foreach two
! R. s* m: l3 w% l& i; U
+ }6 @0 S( a- |; k
dbSave( cvId )
, p) f# R& T! D. h
dbClose( cvId )
( |% F, i/ f$ \* `
+ ]: {2 s$ ?' l1 ?* s
) ; foreact one
4 e3 @# F" h' t
- B4 s4 M3 g7 I; a: r+ w& Y7 B
)
; w! K; W4 v$ T" d- V0 k2 K$ ~6 ? p8 ?
);proc
歡迎光臨 Chip123 科技應用創新平台 (http://chip123.com/)
Powered by Discuz! X3.2