|
有人问检查出缺失以后,怎么添加呢? 给一段代码大家自己改下吧!, a# \% `* x7 E; |- @7 I' p
/*下面是给器件添加REF的代码:* M* Z6 P% W9 h2 ^+ m) b
if(car(n0->violations)->isMirrored then
; {6 E$ {+ |8 Z3 T, ^) Y* K3 G9 a; \3 elayer = "BOTTOM"% V/ g" S4 d- V, ~
else
9 Q/ U' c3 A0 ^layer = "TOP", `# A* d/ u2 t* @
). S. y) R' F5 B6 S& e n; `
textstru = make_axlTextOrientation(?textBlock 1 ?mirrored car(n0->violations)->isMirrored ?justify "center")
3 I; G, @) K0 ett = setof(x0 axlDBGetAttachedText(car(n0->violations)) rexMatchp("REF DES/SILKSCREEN_+" x0->layer))
0 m/ ~( M1 `+ _" D) g( K% zunless(tt
) w$ b1 Q; w8 O2 t5 E4 K7 x* @axlDBCreateText(car(n0->violations)->refdes car(n0->violations)->xy textstru strcat("REF DES/SILKSCREEN_" layer) car(n0->violations))* A8 s1 Y" R- F7 n6 Z) t# r
)$ N8 i* D2 ^9 c8 d
tt = setof(x0 axlDBGetAttachedText(car(n0->violations)) rexMatchp("REF DES/ASSEMBLY_+" x0->layer))# H3 b2 U0 z2 }: O$ w9 }
unless(tt$ U6 ~! I6 m; C& U
axlDBCreateText(car(n0->violations)->refdes car(n0->violations)->xy textstru strcat("REF DES/ASSEMBLY_" layer) car(n0->violations))
6 ?& |4 s; m' w! d# e4 j2 g7 [) |
|