|
本帖最后由 XYX365 于 2012-12-27 07:54 编辑
8 B) G# t: P2 c% w3 p' Lmarco_ma 发表于 2012-12-17 23:32 4 [( |) o* f/ V+ z
嗯 ,这个方法是可以,但太慢了,如果很多器件都要改的话,一个一个太浪费时间了,我是觉得可能有SKILL可 ... - # H* q$ \1 n; j. ^
( A. A& P1 \- t- p) y3 `1 U0 h* ~( s1 |- axlCmdRegister("mop" 'fnMoveOriginPin1)7 m9 r) ?6 E; w% y2 A8 G( ^
- ; |' M, w5 G# z0 \$ o/ N+ n- i
- procedure(fnMoveOriginPin1()
1 F$ ~3 I- T$ c. k/ {! L0 \7 a% v - prog((tDesignType lAllPins dOne nOriginX nOriginY); @- T: G) p* Z* e, a2 o2 [* G0 {
- tDesignType = axlDesignType(t), k5 X8 y' ?6 a% q! f/ m4 `6 `
- unless(tDesignType == "PACKAGE"
. ]5 E, e) E4 G$ c0 a2 I1 l+ J/ f - axlUIConfirm("The skill only run in package!")
1 O* h8 P) _# F7 P1 [& P& x - return(nil)
9 M/ b& Z1 {% n, ~ x - )6 h3 \1 ?$ }' u- m/ [- w
- axlVisibleDesign(t)! ]; B/ E5 b3 U9 Y0 ^" ^
- axlClearSelSet()& a+ u. a* u/ p7 l7 |+ V
- axlSetFindFilter(?enabled '("NOALL" "PINS") ?onButtons '("NOALL" "PINS"))
3 e% d1 U3 {# Q( X - lAllPins = axlGetSelSet(axlAddSelectAll())
3 T$ I) F o; i - axlClearSelSet()
0 J- d' E% R5 i- h3 ^ - foreach(dOne lAllPins
r: Q1 ~6 i1 H Z# A# G) r8 S! | - when(dOne->number == "1"$ y( g% y1 D1 Y
- nOriginX = car(dOne->xy)1 J6 O- G: ^0 j/ z
- nOriginY = cadr(dOne->xy)
' c6 z: M0 k1 T/ f" x# S - )" h; x, j/ _% Q
- )5 H u! ^7 F! Y( a0 P9 `* Y* E; ~" R
-
$ y1 A& p L' y0 F @ - unless((zerop(nOriginX) && zerop(nOriginY)) 0 J4 E5 p. ^- W" I6 R' S6 M4 N. H
- axlDBChangeDesignOrigin(list((- nOriginX) (- nOriginY)))
5 ^5 c7 W# q- _+ C5 Z, m - printf("Change Origin To (%L : %L)" nOriginX nOriginY)
4 Y/ B' O/ Z' | - )
, n7 C2 X7 J {6 i! x - )
0 [* c2 i8 B! q! r - )
8 |3 i6 v( H" J! f% [
复制代码
fMoveOriginPin1.zip
(523 Bytes, 下载次数: 27)
|
|