|
本帖最后由 XYX365 于 2012-12-27 07:54 编辑 6 l; T/ f; [$ m4 S
marco_ma 发表于 2012-12-17 23:32 + m9 J" z G Y f+ K2 p8 x6 V: _
嗯 ,这个方法是可以,但太慢了,如果很多器件都要改的话,一个一个太浪费时间了,我是觉得可能有SKILL可 ...
6 X( X$ ~3 s) G- - W4 t+ U: E! C) A* ]1 u& U% [
- axlCmdRegister("mop" 'fnMoveOriginPin1)% x% e5 n @/ F7 R, {: U
* ?+ G8 [; Y* A- procedure(fnMoveOriginPin1()8 G6 ?: i9 o j* t4 [7 ]- c
- prog((tDesignType lAllPins dOne nOriginX nOriginY)! v' V/ o3 ?% \* ^0 t# _' m# ~
- tDesignType = axlDesignType(t)
, r3 |8 i4 ]! b# `+ N - unless(tDesignType == "PACKAGE"
, ]/ j# {9 U+ [# L$ g - axlUIConfirm("The skill only run in package!")
3 s1 T0 U0 k- ], {2 H - return(nil)
; U$ m) I; [1 r F! ?3 c8 a - )
& G4 B7 v( W3 w4 Q- F4 |9 x V% \ - axlVisibleDesign(t)
" J/ j# p/ Q% N5 U$ q* J - axlClearSelSet()
% g/ p- `1 _1 c* J8 I* Z - axlSetFindFilter(?enabled '("NOALL" "PINS") ?onButtons '("NOALL" "PINS"))- }* c# ]2 H: @0 ^8 ^
- lAllPins = axlGetSelSet(axlAddSelectAll())% y+ R4 ]3 s( p
- axlClearSelSet()1 d/ y' ?' E; m% o2 g
- foreach(dOne lAllPins& i$ H0 ^1 A" I8 Z a
- when(dOne->number == "1"9 R+ ~% K# x" m1 A6 ?
- nOriginX = car(dOne->xy)
8 i- K3 }; H& V8 O, [ - nOriginY = cadr(dOne->xy)
; G- l s' g' {3 G$ I+ \ - )
" i2 O, T I, j( B4 ~8 {! X( L0 e - )
8 F$ `+ O; k/ L0 u# B - : X; q' T: P8 Y5 d
- unless((zerop(nOriginX) && zerop(nOriginY))
$ H* B4 T; w# j' a - axlDBChangeDesignOrigin(list((- nOriginX) (- nOriginY)))
- U2 G& H7 {2 J; B" Q+ O% s: p - printf("Change Origin To (%L : %L)" nOriginX nOriginY)
8 X% u+ ?6 R* I3 q- t' O - )
+ e8 Q' d, K* O5 h( | - )
1 j" N" i8 L. H6 M5 t - )
: f, e* f4 k' K u+ Q! U" v
复制代码
fMoveOriginPin1.zip
(523 Bytes, 下载次数: 27)
|
|