|
% D, D5 [) ~( X- B: E, L& A! {最终搞定了,用了一个小skill搞定了
. d+ E; O3 E; B! Z, AaxlCmdRegister("c_layer" 'c_layer ?cmdType "interactive")( C8 b3 {9 ^+ P' `
( g E0 k @9 i" |9 Qdefun(c_layer (@optional (layer ""))
5 Y( ?5 {, r9 U' x) H- elet((allLayer countLayer)" I" a* c4 ~9 x( W8 M
allLayer = axlGetParam("paramLayerGroup:ETCH")->groupMembers
V$ m- G) r3 c) ~/ p* t* o* R countLayer = length(allLayer)3 k0 w. U% O$ }5 f1 d; P* ] J
if(layer != "" && atoi(layer), ~- W; a7 J2 a" `. H3 y4 c% r
then5 k9 L+ w# D# u3 Y! F* E
layer = atoi(layer)! {" q* t6 k6 m% o$ e! M9 L9 \$ Y. m
if( layer <= countLayer && layer > 0
& }6 k7 j; Y+ r5 f% s" R+ X: K then
# n+ O- e' f3 p6 y+ G' {& Y: R, z w axlVisibleDesign(nil)' l0 Q; z5 I. j
axlVisibleLayer(strcat("ETCH/" nthelem(layer allLayer)) t)
; S0 ~" g/ U: y) r [& ~0 F axlVisibleLayer(strcat("PIN/" nthelem(layer allLayer)) t)
. H; q6 _% }2 @8 \ axlVisibleLayer(strcat("VIA CLASS/" nthelem(layer allLayer)) t)
) R4 C/ ~$ ^: G* o8 n. J8 a6 `+ @ axlVisibleLayer(strcat("DRC ERROR CLASS/" nthelem(layer allLayer)) t)/ P1 m5 Z4 p- R
axlVisibleLayer(strcat("Board Geometry/Outline") t)
1 s& o! S" S" L2 w7 {4 | axlVisibleUpdate(t)8 L4 ?) G/ m- @& G m [$ O G
axlUIWPrint(nil "Swtich layer complet...")
& H/ T I G8 P# |" K else
& W3 D1 o; D) k" R axlUIWPrint(nil "Error,Wrong layer argument!
( q& S$ \0 Y; w5 y );end if. L- p9 V" h. f8 @/ }# b8 u
else; m7 s# X* P2 ], X' X, u
axlUIWPrint(nil "Please Input argument...")5 W2 E; m9 I' f! K0 k+ @
);end if ( k0 _+ `8 H& }- T* o) h
);end let
: F9 P/ ~/ O( w) D, i0 B1 q);end defun- E7 |+ R1 w' S1 }% o9 e/ y
! K6 |9 |, Q" I/ n6 e! ]+ n5 B) ~- o
8 x$ N- D4 u& _9 t$ Q7 X* S
把这个skill加载进allegro,然后输入命令就可以了9 l: t7 |3 H5 a
或者在env文件里面加快捷命令1 2 3 4 ...就可以实现用数字换层7 O2 `) d* p) M3 m
|
评分
-
查看全部评分
|