|
9 S( ]+ ^+ A. a; _最终搞定了,用了一个小skill搞定了% x1 z. [" _1 L5 t# w$ k
axlCmdRegister("c_layer" 'c_layer ?cmdType "interactive")# g" m [/ N+ ]2 y
5 @ A# m* C; n J7 J8 L) d3 j& r
defun(c_layer (@optional (layer "")) s' W# q/ ?5 i/ \; B! {
let((allLayer countLayer)
* X/ S A' {: R- e" } allLayer = axlGetParam("paramLayerGroup:ETCH")->groupMembers; c2 c9 J! h, D+ h
countLayer = length(allLayer)
$ u0 a% A. @9 }$ Z- u& E if(layer != "" && atoi(layer)
+ t4 l% v: m" L# d% u. w then. Z) l, M4 c) A# _& O; {
layer = atoi(layer)2 K/ u. ^5 {$ B) C0 X) H
if( layer <= countLayer && layer > 0
# O+ c' B1 W: ^0 m4 u! w then: `( e6 `/ A# U
axlVisibleDesign(nil)( L7 F' I" H8 n4 d/ d( j8 ?0 y
axlVisibleLayer(strcat("ETCH/" nthelem(layer allLayer)) t)8 T' m5 J( \7 \: F6 g/ h1 Y
axlVisibleLayer(strcat("PIN/" nthelem(layer allLayer)) t)
! s7 `- ^6 P/ p; f( n axlVisibleLayer(strcat("VIA CLASS/" nthelem(layer allLayer)) t) ; ]& u! i1 Y- F. O6 M. c
axlVisibleLayer(strcat("DRC ERROR CLASS/" nthelem(layer allLayer)) t)2 N8 v+ P/ x$ K1 r
axlVisibleLayer(strcat("Board Geometry/Outline") t)
! k7 G6 \* K* s9 q+ h1 Y axlVisibleUpdate(t)5 ~6 p& X- P b7 X. F4 _
axlUIWPrint(nil "Swtich layer complet...")
) c& B2 n+ j& G' y else# \! {3 i# X7 [" y3 r8 c
axlUIWPrint(nil "Error,Wrong layer argument!
2 n" y7 L1 N8 ?# W& K );end if
4 r: o, \/ x4 y+ m. Q$ x: i else
% x8 _) o. E! q! M+ P3 m8 B7 a1 X axlUIWPrint(nil "Please Input argument...")
2 e! V' b; m4 Z+ } );end if ( ?2 e, {" J" L5 o ~# P2 m
);end let
0 M( M: \! z8 O7 F/ n);end defun
7 l: P7 r2 e- e9 e% H" E3 g4 I
! X8 i* ]9 ~7 r F
7 S6 K9 ~: D- d; @- r. ^, N
5 W0 X2 J1 T' }把这个skill加载进allegro,然后输入命令就可以了# ^: h/ c% B1 F/ ]
或者在env文件里面加快捷命令1 2 3 4 ...就可以实现用数字换层$ ^2 f# j* v7 V' W; ~
|
评分
-
查看全部评分
|