本帖最后由 dianzi1987 于 2018-6-26 12:36 编辑 3 ^" J4 F$ `% b! O
! X: D6 ` @- r4 W3 k
AD语法是精华,可以说,只有想不到的,没有做不到的。做好用过的语法可以添加到喜爱,按快捷键Y调用。当前用到的:8 p- S" V! M, T0 [' J
目的1:是选中,然后按需要编辑。
2 ~/ h9 M# s4 y* A0 _5 |. j4 E1 d目的2:定义规则或者条件筛选
6 t4 o4 c3 J. R3 G% u4 L
$ x$ F8 [# |# z. l6 h' b; i1.180度 0度 360度元件:IsComponent And(Rotation = 180)or IsComponent And(Rotation = 0)or IsComponent And(Rotation = 360) + i# i5 R! k) @" u/ {& R
2 .底层90度与270度元件:OnBottomLayer and IsComponent And(Rotation = 90)or OnBottomLayer and IsComponent And(Rotation = 270) F" i+ \3 G" D2 s8 T# o! g+ a
3. 顶层90度与270度元件:OnTopLayer and IsComponent And(Rotation = 90)or OnTopLayer and IsComponent And(Rotation = 270) 4.非GND网络焊盘:(ObjectKind = 'Via') And (Net <> 'GND') OR(ObjectKind = 'Pad') And (Net <> 'GND') 5.顶层元件: IsComponent and OnTopLayer 6.底层元件:IsComponent and OnBottomLayer 7.顶层到3.3V层面的过孔:(ObjectKind = 'Via') And (StartLayer = 'Top Layer') And (StopLayer = '3.3V') 0 k& Z8 k+ @5 h; s3 f2 O6 B
8.选取的封装决定铺铜类型,规则设置用: HasFootprint('USB4PIN') 9.选取某一焊盘:Haspad 10.板挖空与电气部分短路设置为允许的语法。 11.IsBoardCutoutRegion 12.选择不是standard的元件,用在BOM数量对照上。 (ObjectKind = 'Component') And (ComponentType <> 'Standard') U7 |$ a3 h- v) |
; I c' M+ P0 H+ V8 j/ B2 V
以下来自网友“星罗棋布”,是通过定义命令菜单实现的,相对麻烦一些。 只操作顶层走线的表达式为:expr=IsTrack and OnTopLayer|mask=True|apply=True
4 o& r$ n$ A0 i! {3 {8 @; z) [6 }% J只操作底层走线的表达式为:expr=IsTrack and OnBottomLayer|mask=True|apply=True) D [7 @$ e; e! n
只操作电气走线的表达式为:expr=IsTrack and IsElectrical|mask=True|apply=True
( @! D, h2 v' w2 i5 ^# }/ }7 t# }只操作过孔的表达式为: expr=IsVia|mask=True|apply=True
7 G; L; j$ T% E4 T7 D只操作顶层元件的表达式为:expr=IsComponent and OnTopLayer|mask=True|apply=True & R" y3 e, U! r: C! H
expr,表达式;5 t4 F9 L) N7 O2 |8 _; s' k
iscomponent,对象是元件;* V M# S& D& ?# ~" l7 Y
and,并且;# N$ b2 F. T; ]& @3 h
onbottomlayer,在底层;* U c0 y& s Z. l% M% Q8 t
mask=true,进行掩码操作;
0 C/ s" e2 Y& O1 b5 Tapply=true,应用确认。
0 b6 k6 h4 M* ]. ? |