找回密码
 注册
查看: 1005|回复: 3
打印 上一主题 下一主题

求助高手,有一个老的skill导致17.2无法运行

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2018-10-8 19:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
本帖最后由 gdm0121 于 2018-10-12 10:31 编辑

最近更新了17.2的补丁,发现有一个以前经常使用的skill导致17.2无法运行,没有更新之前是可以使用的。之前论坛看到有人说是更新补丁以后造成的。请教有没有高人可以帮忙看一下是什么原因导致的,有没有可能在老的skill基础上修改一下,可以在17.2更新补丁以后能够正常使用,附件就是这个skill,没有加密的,很早以前早论坛上下载的,可以自动转向文字面,很实用的,经常会用到。望知道的人不吝赐教,多谢了。一直使用的有很多都是好长时间的老古董了,只有这个会造成17.2无法运行......或者说有没有类似功能的skill?


;---rotate components' refdes to right direction---


axlVisibleDesign(nil)
axlVisibleLayer( "BOARD GEOMETRY/OUTLINE" t )
axlVisibleLayer( "PIN/TOP" t )
axlVisibleLayer( "PIN/BOTTOM" t )
axlVisibleLayer( "REF DES/SILKSCREEN_TOP" t )
axlVisibleLayer( "REF DES/SILKSCREEN_BOTTOM" t )
axlVisibleLayer( "PACKAGE GEOMETRY/SILKSCREEN_TOP" t )
axlVisibleLayer( "PACKAGE GEOMETRY/SILKSCREEN_BOTTOM" t )



;---Function jfhGetRefIDComDir() will get standard information which is need to rotate the REF
;---Include top side components direction (l_nTopCompDir),
;---bottom side components direction (l_nBtmCompDir),
;---top side components' REFDES DBID list(l_dbTopRefDbid),
;---bottom side components' REFDES DBID list(l_dbBtmRefDbid),






procedure( jfhGetRefIDComDir()
           dbCurrentDesign = axlDBGetDesign()
           l_dbAllSyms = dbCurrentDesign->symbols

;---fill l_nTopCompDir and l_nBtmCompDir with components' direction


           foreach(sym l_dbAllSyms
               if(stringp(sym->refdes);if read something unknown,skip the following steps
                 then
                   if(sym->isMirrored != t ;on top side

                   then
                        l_nTopCompDir = cons(round(sym->rotation) l_nTopCompDir)
                        l_dbAttachedTxt = axlDBGetAttachedText(sym)

                        foreach(txt l_dbAttachedTxt

                                if(txt->layer == "REF DES/SILKSCREEN_TOP"
                                then
                                   l_dbTopRefDbid = cons(txt l_dbTopRefDbid)
                                );end of if (txt->layer == "REF DES/SILKSCREEN_TOP"
                        );end of foreach(txt l_dbAttachedTxt

                   else
                        l_nBtmCompDir = cons(round(sym->rotation) l_nBtmCompDir)
                        l_dbAttachedTxt = axlDBGetAttachedText(sym)

                        foreach(txt l_dbAttachedTxt

                                if(txt->layer == "REF DES/SILKSCREEN_BOTTOM"
                                then
                                   l_dbBtmRefDbid = cons(txt l_dbBtmRefDbid)
                                );end of if(txt->layer == "REF DES/SILKSCREEN_BOTTOM"
                        );end of foreach(txt l_dbAttachedTxt

                   );end of if (sym->isMirrored != t ;on top side
                 else

               );end of if(stringp(sym->refdes)

           );end of foreach(sym l_dbAllSyms

);end of procedure( jfhGetRefIDComDir()







;------------------------------------------------------
;----------Rotate Refdes on Top side----------------------
;------------------------------------------------------
;---local variable ll_dbTopRef and ll_fTopComDir
;---the index "ll_" means list local



procedure( jfhRotateTopRef(ll_dbTopRef ll_nTopComDir)
          foreach((dbTopRef nTopComDir) ll_dbTopRef ll_nTopComDir

                 ;get information no need to modify
                 sRefContent = dbTopRef->text
                 dbParent = dbTopRef->parent
                 ptRefxy = dbTopRef->xy
                 sRefLayer = dbTopRef->layer
                 bMirror = dbTopRef->isMirrored
                 sJustify = dbTopRef->justify
                 sTxtBlock = dbTopRef->textBlock
                 ;nRefOri = round(dbTopRef->rotation)

                 ;if components' direction is not 90 and 270 degree,its REF degree is 0,otherwise is 90
                 ;and if the original refdes's direction is right,skip it
                 ;if(nRefOri != 90 && nRefOri != 0
                   ;then

                     if(nTopComDir > 85 && nTopComDir < 95 || nTopComDir > 265 && nTopComDir < 275

                     then
                        nRefDir = 90

                     else
                        nRefDir = 0

                     );end of if(nTopComDir > 85 && nTopComDir < 95 || nTopComDir > 265 && nTopComDir < 275

                   ;else
                    ; nRefDir = nRefOri
                 ;);end of if(nRefOri != 90 && nRefOri != 0

                 ;fill the text structure r_textOrientation
                 stTxtOri = make_axlTextOrientation(
                                 ?textBlock sTxtBlock
                                 ?rotation nRefDir
                                 ?mirrored bMirror
                                 ?justify sJustify
                            );end fill structure

                 isCreation = axlDBCreateText(
                            sRefContent
                            ptRefxy
                            stTxtOri
                            sRefLayer
                            dbParent
                            )

                 if( isCreation != nil axlDeleteObject( dbTopRef))

          );end of foreach((dbTopRef nTopComDir) ll_dbTopRef ll_nTopComDir

);end of procedure( jfhRotateTopRef(ll_dbTopRef ll_nTopComDir)


;---------------------------------------------------------------------------
;----------Rotate Refdes on Btm side----------------------
;---------------------------------------------------------------------------


procedure( jfhRotateBtmRef(ll_dbBtmRef ll_nBtmComDir)
          foreach((dbBtmRef nBtmComDir) ll_dbBtmRef ll_nBtmComDir

                 ;get information no need to modify
                 sRefContent = dbBtmRef->text
                 dbParent = dbBtmRef->parent
                 ptRefxy = dbBtmRef->xy
                 sRefLayer = dbBtmRef->layer
                 bMirror = dbBtmRef->isMirrored
                 sJustify = dbBtmRef->justify
                 sTxtBlock = dbBtmRef->textBlock
                 ;nRefOri = round(dbBtmRef->rotation)

                 ;if components' direction is not 90 and 90 degree,its REF degree is 0,otherwise is 270
                 ;and if the original refdes's direction is right,skip it
                 ;if(nRefOri != 270 && nRefOri != 0
                   ;then
                     if(nBtmComDir > 85 && nBtmComDir < 95 || nBtmComDir > 265 && nBtmComDir < 275

                     then
                        nRefDir = 270


                     else
                        nRefDir = 0

                     );end of if(nBtmComDir > 85 && nBtmComDir < 95 || nBtmComDir > 265 && nBtmComDir < 275

                   ;else
                     ;nRefDir = nRefOri
                 ;);end of if(nRefOri != 270 && nRefOri != 0

                 ;fill the text structure r_textOrientation
                 stTxtOri = make_axlTextOrientation(
                                 ?textBlock sTxtBlock
                                 ?rotation nRefDir
                                 ?mirrored bMirror
                                 ?justify sJustify
                            );end fill structure

                 isCreation = axlDBCreateText(
                            sRefContent
                            ptRefxy
                            stTxtOri
                            sRefLayer
                            dbParent
                            )

                 if( isCreation != nil axlDeleteObject( dbBtmRef))

          );end of foreach((dbBtmRef nBtmComDir) ll_dbBtmRef ll_nBtmComDir

);end of procedure( jfhRotateTopRef(ll_dbBtmRef ll_nBtmComDir)


;------------------------------------------------------
;----------Rotate Refdes on Top side skip right--------
;------------------------------------------------------
;---local variable ll_dbTopRef and ll_fTopComDir
;---the index "ll_" means list local



procedure( jfhRotateTopRefIr(ll_dbTopRef ll_nTopComDir)
          foreach((dbTopRef nTopComDir) ll_dbTopRef ll_nTopComDir

                 ;get information no need to modify
                 sRefContent = dbTopRef->text
                 dbParent = dbTopRef->parent
                 ptRefxy = dbTopRef->xy
                 sRefLayer = dbTopRef->layer
                 bMirror = dbTopRef->isMirrored
                 sJustify = dbTopRef->justify
                 sTxtBlock = dbTopRef->textBlock
                 nRefOri = round(dbTopRef->rotation)

                 ;if components' direction is not 90 and 270 degree,its REF degree is 0,otherwise is 90
                 ;and if the original refdes's direction is right,skip it
                 if(nRefOri != 90 && nRefOri != 0
                   then

                     if(nTopComDir > 85 && nTopComDir < 95 || nTopComDir > 265 && nTopComDir < 275

                     then
                        nRefDir = 90

                     else
                        nRefDir = 0

                     );end of if(nTopComDir > 85 && nTopComDir < 95 || nTopComDir > 265 && nTopComDir < 275

                   else
                     nRefDir = nRefOri
                 );end of if(nRefOri != 90 && nRefOri != 0

                 ;fill the text structure r_textOrientation
                 stTxtOri = make_axlTextOrientation(
                                 ?textBlock sTxtBlock
                                 ?rotation nRefDir
                                 ?mirrored bMirror
                                 ?justify sJustify
                            );end fill structure

                 isCreation = axlDBCreateText(
                            sRefContent
                            ptRefxy
                            stTxtOri
                            sRefLayer
                            dbParent
                            )

                 if( isCreation != nil axlDeleteObject( dbTopRef))

          );end of foreach((dbTopRef nTopComDir) ll_dbTopRef ll_nTopComDir

);end of procedure( jfhRotateTopRefIr(ll_dbTopRef ll_nTopComDir)


;---------------------------------------------------------------------------
;----------Rotate REF on Btm side skip right----------------------
;---------------------------------------------------------------------------


procedure( jfhRotateBtmRefIr(ll_dbBtmRef ll_nBtmComDir)
          foreach((dbBtmRef nBtmComDir) ll_dbBtmRef ll_nBtmComDir

                 ;get information no need to modify
                 sRefContent = dbBtmRef->text
                 dbParent = dbBtmRef->parent
                 ptRefxy = dbBtmRef->xy
                 sRefLayer = dbBtmRef->layer
                 bMirror = dbBtmRef->isMirrored
                 sJustify = dbBtmRef->justify
                 sTxtBlock = dbBtmRef->textBlock
                 nRefOri = round(dbBtmRef->rotation)

                 ;if components' direction is not 90 and 90 degree,its REF degree is 0,otherwise is 270
                 ;and if the original refdes's direction is right,skip it
                 if(nRefOri != 270 && nRefOri != 0
                   then
                     if(nBtmComDir > 85 && nBtmComDir < 95 || nBtmComDir > 265 && nBtmComDir < 275

                     then
                        nRefDir = 270


                     else
                        nRefDir = 0

                     );end of if(nBtmComDir > 85 && nBtmComDir < 95 || nBtmComDir > 265 && nBtmComDir < 275

                   else
                     nRefDir = nRefOri
                 );end of if(nRefOri != 270 && nRefOri != 0

                 ;fill the text structure r_textOrientation
                 stTxtOri = make_axlTextOrientation(
                                 ?textBlock sTxtBlock
                                 ?rotation nRefDir
                                 ?mirrored bMirror
                                 ?justify sJustify
                            );end fill structure

                 isCreation = axlDBCreateText(
                            sRefContent
                            ptRefxy
                            stTxtOri
                            sRefLayer
                            dbParent
                            )

                 if( isCreation != nil axlDeleteObject( dbBtmRef))

          );end of foreach((dbBtmRef nBtmComDir) ll_dbBtmRef ll_nBtmComDir

);end of procedure( jfhRotateTopRefIr(ll_dbBtmRef ll_nBtmComDir)


;--------Registe Commands--------------------------------------------------------------


axlCmdRegister("ref_rot" 'jfhrotateref)
axlCmdRegister("ch_refskip" 'jfhrotaterefIr)

;---command for rotate all refdes---
procedure(jfhrotateref()

   l_nTopCompDir = nil
   l_nBtmCompDir = nil
   l_dbTopRefDbid = nil
   l_dbBtmRefDbid = nil

   if(axlOKToProceed() != t
        then
            axlMsgPut("Finish current command first")
            ;return(nil)
        else
            jfhGetRefIDComDir()
            jfhRotateTopRef(l_dbTopRefDbid l_nTopCompDir)
            jfhRotateBtmRef(l_dbBtmRefDbid l_nBtmCompDir)
            axlMsgPut("OK")
   );if(axlOKToProceed() != t
)

;------command for rotate refdes which are at wrong direction---

procedure(jfhrotaterefIr()

   l_nTopCompDir = nil
   l_nBtmCompDir = nil
   l_dbTopRefDbid = nil
   l_dbBtmRefDbid = nil

   if(axlOKToProceed() != t
        then
            axlMsgPut("Finish current command first")
            ;return(nil)
        else
            jfhGetRefIDComDir()
            jfhRotateTopRefIr(l_dbTopRefDbid l_nTopCompDir)
            jfhRotateBtmRefIr(l_dbBtmRefDbid l_nBtmCompDir)
            axlMsgPut("OK")
   );if(axlOKToProceed() != t
)

ref_rot.rar

1.71 KB, 下载次数: 1, 下载积分: 贡献 -30 , 威望 -10

该用户从未签到

3#
 楼主| 发表于 2018-10-11 22:02 | 只看该作者
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-5-3 17:00 , Processed in 0.078125 second(s), 27 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表