bingshuihuo 发表于 2017-11-22 09:44 你试试 |
1.08 KB, 下载次数: 1, 下载积分: 贡献 -30 , 威望 -10
|
axlCmdRegister("quick_textset" 'quicktext) defun( quicktext () let( (curdsnunit) curdsnunit = axlGetParam("paramDesign")->units case(curdsnunit ("mils" du = 1) ("millimeters" du = 0.0254 ) ;(u can add other units) ) old_visList = axlVisibleGet() setTextSize() axlVisibleSet(old_visList) )) defun( setTextSize () let(() ;1,GET 字体 Text_need = '("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16") foreach(text_block Text_need p = axlGetParam(strcat("paramTextBlock:" text_block)) block_pl = atoi(text_block) ;change string to num (du/1.0) p->width = (20 + 5*block_pl)*(du/1.0) p->height = (25 + 5*block_pl)*(du/1.0) p->lineSpace = 25*(du/1.0) p->photoWidth = 6*(du/1.0) p->charSpace = 5*(du/1.0) axlSetParam(p) ) ;set the textblock size axlVisibleDesign(nil) axlVisibleLayer("REF DES/SILKSCREEN_TOP" t) axlVisibleLayer("REF DES/SILKSCREEN_BOTTOM" t) ;if u need other text ,please add below: ;axlVisibleLayer("REF DES/assembly_TOP" t) axlClearSelSet() axlSetFindFilter( ?enabled (list "noall" "text" "clinesegs") , ?onButtons (list "text")) allrefs = axlGetSelSet(axlAddSelectAll()) foreach(i allrefs axlDBChangeText(i nil 2) ) ;change the resdes axlVisibleDesign(nil) axlVisibleLayer("PACKAGE GEOMETRY/SILKSCREEN_TOP" t) axlVisibleLayer("BOARD GEOMETRY/SILKSCREEN_TOP" t) axlVisibleLayer("PACKAGE GEOMETRY/SILKSCREEN_BOTTOM" t) axlVisibleLayer("BOARD GEOMETRY/SILKSCREEN_BOTTOM" t) axlClearSelSet() axlSetFindFilter( ?enabled (list "noall" "text" "clinesegs") , ?onButtons (list "text")) alloth_text = axlGetSelSet(axlAddSelectAll()) foreach(i alloth_text axlDBChangeText(i nil 1)) ;change all other text )) |
| 咋使用 上个例子 |
| 找到原因,只需将1.0/du改为du/1.0即可。 |
/1
关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )
GMT+8, 2025-11-23 12:40 , Processed in 0.156250 second(s), 30 queries , Gzip On.
地址:深圳市南山区科技生态园2栋A座805 电话:19926409050